(bytecodeBuffer)
| 375 | * @returns {any} The result of the very last statement executed in the script. |
| 376 | */ |
| 377 | const runBytecode = function (bytecodeBuffer) { |
| 378 | if (!isBuffer(bytecodeBuffer)) { |
| 379 | throw new Error('bytecodeBuffer must be a buffer object.'); |
| 380 | } |
| 381 | |
| 382 | const script = generateScript(bytecodeBuffer); |
| 383 | |
| 384 | return script.runInThisContext(); |
| 385 | }; |
| 386 | |
| 387 | /** |
| 388 | * Compiles JavaScript file to .jsc file. |
no test coverage detected
searching dependent graphs…