diff options
author | Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> | 2023-06-19 21:48:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 21:48:20 -0400 |
commit | 3716cbd44655acd7cb126d10db74f9734e498c5a (patch) | |
tree | 52d8f6105b4114149befd5635047375fd055eef1 /lib/compilers/typescript-native.ts | |
parent | a34f81241cf9fd5969cf11e592d498d75da4e8d8 (diff) | |
download | compiler-explorer-3716cbd44655acd7cb126d10db74f9734e498c5a.tar.gz compiler-explorer-3716cbd44655acd7cb126d10db74f9734e498c5a.zip |
Support control flow graphs from the IR pane (#5155)gh-7888
On top of #5154

Additionally, while I was here, added support for multiple control flow
graphs to be opened from one compiler instead of disabling the button
once one is opened. And improved the implementation for how this was
done for the llvm opt pipeline.
And did some type work along the way.
Diffstat (limited to 'lib/compilers/typescript-native.ts')
-rw-r--r-- | lib/compilers/typescript-native.ts | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/compilers/typescript-native.ts b/lib/compilers/typescript-native.ts index a830dd910..11790ce50 100644 --- a/lib/compilers/typescript-native.ts +++ b/lib/compilers/typescript-native.ts @@ -66,7 +66,7 @@ export class TypeScriptNativeCompiler extends BaseCompiler { userOptions?: string[], ): string[] { return []; - } + } override optionsForBackend(backendOptions: Record<string, any>, outputFilename: string): string[] { const addOpts: string[] = []; @@ -82,7 +82,7 @@ export class TypeScriptNativeCompiler extends BaseCompiler { } return addOpts; - } + } override getIrOutputFilename(inputFilename: string, filters: ParseFiltersAndOutputOptions): string { const outputFilename = this.getOutputFilename(path.dirname(inputFilename), this.outputFilebase); @@ -93,14 +93,19 @@ export class TypeScriptNativeCompiler extends BaseCompiler { return outputFilename; } - override async generateIR(inputFilename: string, options: string[], - irOptions: LLVMIrBackendOptions, filters: ParseFiltersAndOutputOptions) { - const newOptions = [ ...options.filter(e => !e.startsWith('--emit=') && !e.startsWith('-o=')) ]; + override async generateIR( + inputFilename: string, + options: string[], + irOptions: LLVMIrBackendOptions, + produceCfg: boolean, + filters: ParseFiltersAndOutputOptions, + ) { + const newOptions = [...options.filter(e => !e.startsWith('--emit=') && !e.startsWith('-o='))]; if (this.tscNewOutput) { newOptions.push('-o=' + this.getIrOutputFilename(inputFilename, filters)); } - return await super.generateIR(inputFilename, newOptions, irOptions, filters); + return await super.generateIR(inputFilename, newOptions, irOptions, produceCfg, filters); } override async processIrOutput(output, irOptions: LLVMIrBackendOptions, filters: ParseFiltersAndOutputOptions) { @@ -109,7 +114,7 @@ export class TypeScriptNativeCompiler extends BaseCompiler { } return this.llvmIr.process(output.stderr.map(l => l.text).join('\n'), irOptions); - } + } override async handleInterpreting(key, executeParameters) { executeParameters.args = [ |