зеркало из https://github.com/mozilla/pluotsorbet.git
Add parameter to VM.compile to generate some debugging statements in the compiled functions
This commit is contained in:
Родитель
62ac460623
Коммит
fdfa683eea
7
vm.js
7
vm.js
|
@ -1143,7 +1143,7 @@ VM.execute = function(ctx) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
VM.compile = function(methodInfo, ctx) {
|
VM.compile = function(methodInfo, ctx, debugStmtEnabled) {
|
||||||
var depth = 0, maxDepth = 0;
|
var depth = 0, maxDepth = 0;
|
||||||
var locals = 0, maxLocals = 0;
|
var locals = 0, maxLocals = 0;
|
||||||
var ip = 0;
|
var ip = 0;
|
||||||
|
@ -1304,8 +1304,9 @@ VM.compile = function(methodInfo, ctx) {
|
||||||
|
|
||||||
var code = "";
|
var code = "";
|
||||||
|
|
||||||
//var opName = OPCODES[op];
|
if (debugStmtEnabled) {
|
||||||
//code += " // " + opName + " [0x" + op.toString(16) + "]\n";
|
code += " // " + OPCODES[op] + " [0x" + op.toString(16) + "]\n";
|
||||||
|
}
|
||||||
|
|
||||||
var newDepth = stackLayout.get(ip);
|
var newDepth = stackLayout.get(ip);
|
||||||
if (typeof newDepth !== "undefined") {
|
if (typeof newDepth !== "undefined") {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче