MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / exec

Method exec

lib/compilers/ppci.ts:45–62  ·  view source on GitHub ↗
(compiler: string, args: string[], options: ExecutionOptions)

Source from the content-addressed store, hash-verified

43 }
44
45 override exec(compiler: string, args: string[], options: ExecutionOptions) {
46 if (compiler.endsWith('.py')) {
47 const python = this.env.ceProps<string>('python3');
48 options = options || {};
49
50 const matches = compiler.match(/^(.*)(\/ppci\/)(.*).py/);
51 if (matches) {
52 const pythonPath = matches[1];
53 const ppciName = `ppci.${matches[3].replace('/', '.')}`;
54 options.env = {PYTHONPATH: pythonPath};
55 const python_args = ['-m', ppciName].concat(args);
56 return exec.execute(python, python_args, options);
57 }
58 assert(false, `Invalid ppci path ${compiler}`);
59 } else {
60 return super.exec(compiler, args, options);
61 }
62 }
63}

Callers 15

runCompilerMethod · 0.45
runCompilerMethod · 0.45
runCompilerMethod · 0.45
generateSmaliMethod · 0.45
runCompilerMethod · 0.45
runCompilerMethod · 0.45
objdumpMethod · 0.45
getMainClassNameMethod · 0.45
parseAsmForClassMethod · 0.45
runCompilerMethod · 0.45
generateProfileMethod · 0.45
objdumpMethod · 0.45

Calls 3

matchMethod · 0.80
executeMethod · 0.65
assertFunction · 0.50

Tested by

no test coverage detected