Skip to content

Commit ef2dde4

Browse files
committed
[UI] Add new command to run "Structure Replacement" transformation.
1 parent cbad44a commit ef2dde4

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"onCommand:tsar.analysis.check",
2424
"onCommand:tsar.transform.propagate",
2525
"onCommand:tsar.transform.inline",
26+
"onCommand:tsar.transform.replace",
2627
"onCommand:tsar.transform.dedecls",
2728
"onCommand:tsar.transform.rename",
2829
"onCommand:tsar.parallel.openmp",
@@ -96,6 +97,10 @@
9697
"command": "tsar.transform.inline",
9798
"title": "TSAR Function Inlining"
9899
},
100+
{
101+
"command": "tsar.transform.replace",
102+
"title": "TSAR Structure Replacement"
103+
},
99104
{
100105
"command": "tsar.transform.rename",
101106
"title": "TSAR Local Renaming"
@@ -189,6 +194,16 @@
189194
"when": "editorLangId == 'c'",
190195
"group": "1_tsar"
191196
},
197+
{
198+
"command": "tsar.transform.replace",
199+
"when": "editorLangId == 'cpp'",
200+
"group": "1_tsar"
201+
},
202+
{
203+
"command": "tsar.transform.replace",
204+
"when": "editorLangId == 'c'",
205+
"group": "1_tsar"
206+
},
192207
{
193208
"command": "tsar.analysis.check",
194209
"when": "editorLangId == 'cpp'",
@@ -281,6 +296,16 @@
281296
"when": "resourceLangId == 'c'",
282297
"group": "1_tsar"
283298
},
299+
{
300+
"command": "tsar.transform.replace",
301+
"when": "resourceLangId == 'cpp'",
302+
"group": "1_tsar"
303+
},
304+
{
305+
"command": "tsar.transform.replace",
306+
"when": "resourceLangId == 'c'",
307+
"group": "1_tsar"
308+
},
284309
{
285310
"command": "tsar.analysis.check",
286311
"when": "resourceLangId == 'cpp'",

src/extension.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ export function activate(context: vscode.ExtensionContext) {
101101
title: 'TSAR Function Inlining',
102102
run: '-clang-inline'
103103
},
104+
{
105+
command: 'tsar.transform.replace',
106+
title: 'TSAR Structure Replacement',
107+
run: '-clang-struct-replacement'
108+
},
104109
{
105110
command: 'tsar.transform.rename',
106111
title: 'TSAR Local Renaming',

0 commit comments

Comments
 (0)