MCPcopy
hub / github.com/patriksimek/vm2 / _compileVM

Method _compileVM

lib/script.js:351–357  ·  view source on GitHub ↗

* Will return the cached version of the script intended for VM or compile it. * * @private * @return {vm.Script} The compiled script * @throws {SyntaxError} If there is a syntax error in the script.

()

Source from the content-addressed store, hash-verified

349 * @throws {SyntaxError} If there is a syntax error in the script.
350 */
351 _compileVM() {
352 let script = this._compiledVM;
353 if (!script) {
354 this._compiledVM = script = this._compile('', '');
355 }
356 return script;
357 }
358
359 /**
360 * Will return the cached version of the script intended for NodeVM or compile it.

Callers 2

compileMethod · 0.95
runMethod · 0.80

Calls 1

_compileMethod · 0.95

Tested by

no test coverage detected