2016-02-25 12:07:07 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
wrap: no
|
|
|
|
test function name: f
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
if (0) {
|
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
|
|
|
frame size: 0
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 4
|
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 55 S> */ B(LdaSmi), I8(-1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 65 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
if ('lucky') {
|
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
|
|
|
frame size: 0
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 4
|
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 36 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 45 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
if (false) {
|
|
|
|
return 1;
|
|
|
|
} else {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
|
|
|
frame size: 0
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 4
|
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 59 S> */ B(LdaSmi), I8(-1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 69 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
if (false) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
|
|
|
frame size: 0
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 3
|
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
|
|
|
/* 17 S> */ B(LdaUndefined),
|
|
|
|
/* 48 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
var a = 1;
|
|
|
|
if (a) {
|
|
|
|
a += 1;
|
|
|
|
} else {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
2017-04-10 09:30:51 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2017-04-10 09:30:51 +00:00
|
|
|
bytecode array length: 21
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 25 S> */ B(LdaSmi), I8(1),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2017-04-10 09:30:51 +00:00
|
|
|
/* 30 S> */ B(JumpIfToBooleanFalse), U8(11),
|
|
|
|
/* 43 S> */ B(Ldar), R(0),
|
2017-07-27 12:45:00 +00:00
|
|
|
B(AddSmi), I8(1), U8(0),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(Jump), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 66 S> */ B(LdaSmi), I8(2),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 75 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 80 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(a) {
|
|
|
|
if (a <= 0) {
|
|
|
|
return 200;
|
|
|
|
} else {
|
|
|
|
return -200;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f(99);
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 0
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 2
|
2016-08-30 10:21:02 +00:00
|
|
|
bytecode array length: 19
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 18 S> */ B(LdaZero),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 24 E> */ B(TestLessThanOrEqual), R(arg0), U8(0),
|
2016-06-21 15:26:50 +00:00
|
|
|
B(JumpIfFalse), U8(7),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 36 S> */ B(Wide), B(LdaSmi), I16(200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 47 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 63 S> */ B(Wide), B(LdaSmi), I16(-200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 75 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 80 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(a, b) { if (a in b) { return 200; } }f('prop', { prop: 'yes'});
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 0
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 3
|
2016-06-09 13:32:33 +00:00
|
|
|
bytecode array length: 14
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 19 S> */ B(Ldar), R(arg1),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 25 E> */ B(TestIn), R(arg0),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(7),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 33 S> */ B(Wide), B(LdaSmi), I16(200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 47 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(z) { var a = 0; var b = 0; if (a === 0.01) {
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
return 200; } else { return -200; } } f(0.001);
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 2
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 2
|
2017-07-17 19:02:35 +00:00
|
|
|
bytecode array length: 29
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
|
|
|
/* 24 S> */ B(LdaZero),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 35 S> */ B(LdaZero),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(1),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 38 S> */ B(LdaConstant), U8(0),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 44 E> */ B(TestEqualStrict), R(0), U8(0),
|
2017-07-17 19:02:35 +00:00
|
|
|
B(JumpIfFalse), U8(10),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 58 S> */ B(Mov), R(0), R(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 1081 S> */ B(Wide), B(LdaSmi), I16(200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 1092 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 1102 S> */ B(Wide), B(LdaSmi), I16(-200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 1114 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 1117 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
2016-09-06 16:10:19 +00:00
|
|
|
HEAP_NUMBER_TYPE [0.01],
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
var a = 0; var b = 0;
|
|
|
|
if (a) {
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
b = a; a = b;
|
|
|
|
return 200; } else { return -200; }
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
|
|
|
frame size: 2
|
|
|
|
parameter count: 1
|
2017-07-17 19:02:35 +00:00
|
|
|
bytecode array length: 26
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
|
|
|
/* 25 S> */ B(LdaZero),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 36 S> */ B(LdaZero),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(1),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 41 S> */ B(Ldar), R(0),
|
2017-07-17 19:02:35 +00:00
|
|
|
B(JumpIfToBooleanFalse), U8(10),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 52 S> */ B(Mov), R(0), R(1),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 1076 S> */ B(Wide), B(LdaSmi), I16(200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 1087 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 1097 S> */ B(Wide), B(LdaSmi), I16(-200),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 1109 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 1112 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
2016-04-05 13:00:49 +00:00
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(a, b) {
|
|
|
|
if (a == b) { return 1; }
|
|
|
|
if (a === b) { return 1; }
|
|
|
|
if (a < b) { return 1; }
|
|
|
|
if (a > b) { return 1; }
|
|
|
|
if (a <= b) { return 1; }
|
|
|
|
if (a >= b) { return 1; }
|
|
|
|
if (a in b) { return 1; }
|
|
|
|
if (a instanceof b) { return 1; }
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
f(1, 1);
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 0
|
2016-04-05 13:00:49 +00:00
|
|
|
parameter count: 3
|
2017-10-23 09:18:57 +00:00
|
|
|
bytecode array length: 82
|
2016-04-05 13:00:49 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 21 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 27 E> */ B(TestEqual), R(arg0), U8(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 35 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 44 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 49 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 55 E> */ B(TestEqualStrict), R(arg0), U8(1),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 64 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 73 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 78 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 84 E> */ B(TestLessThan), R(arg0), U8(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 91 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 100 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 105 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 111 E> */ B(TestGreaterThan), R(arg0), U8(3),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 118 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 127 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 132 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 138 E> */ B(TestLessThanOrEqual), R(arg0), U8(4),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 146 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 155 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 160 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 166 E> */ B(TestGreaterThanOrEqual), R(arg0), U8(5),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 174 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 183 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 188 S> */ B(Ldar), R(arg1),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 194 E> */ B(TestIn), R(arg0),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 202 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 211 S> */ B(Return),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 216 S> */ B(Ldar), R(arg1),
|
2017-10-23 09:18:57 +00:00
|
|
|
/* 222 E> */ B(TestInstanceOf), R(arg0), U8(6),
|
2016-05-17 11:23:59 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 238 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 247 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 252 S> */ B(LdaZero),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 261 S> */ B(Return),
|
2016-04-05 13:00:49 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f() {
|
|
|
|
var a = 0;
|
|
|
|
if (a) {
|
|
|
|
return 20;
|
|
|
|
} else {
|
|
|
|
return -20;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f();
|
|
|
|
"
|
|
|
|
frame size: 1
|
|
|
|
parameter count: 1
|
2016-06-21 15:26:50 +00:00
|
|
|
bytecode array length: 14
|
2016-04-05 13:00:49 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 10 E> */ B(StackCheck),
|
|
|
|
/* 25 S> */ B(LdaZero),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2016-06-21 15:26:50 +00:00
|
|
|
/* 30 S> */ B(JumpIfToBooleanFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 43 S> */ B(LdaSmi), I8(20),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 53 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 69 S> */ B(LdaSmi), I8(-20),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 80 S> */ B(Return),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 85 S> */ B(Return),
|
2016-04-05 13:00:49 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
2016-08-15 13:10:41 +00:00
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
function f(a, b) {
|
|
|
|
if (a == b || a < 0) {
|
|
|
|
return 1;
|
|
|
|
} else if (a > 0 && b > 0) {
|
|
|
|
return 0;
|
|
|
|
} else {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
f(-1, 1);
|
|
|
|
"
|
|
|
|
frame size: 0
|
|
|
|
parameter count: 3
|
2016-08-30 10:21:02 +00:00
|
|
|
bytecode array length: 36
|
2016-08-15 13:10:41 +00:00
|
|
|
bytecodes: [
|
|
|
|
/* 10 E> */ B(StackCheck),
|
|
|
|
/* 21 S> */ B(Ldar), R(arg1),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 27 E> */ B(TestEqual), R(arg0), U8(0),
|
2016-08-30 10:21:02 +00:00
|
|
|
B(JumpIfTrue), U8(8),
|
2016-08-15 13:10:41 +00:00
|
|
|
B(LdaZero),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 37 E> */ B(TestLessThan), R(arg0), U8(1),
|
2016-08-15 13:10:41 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 48 S> */ B(LdaSmi), I8(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 57 S> */ B(Return),
|
2016-08-15 13:10:41 +00:00
|
|
|
/* 67 S> */ B(LdaZero),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 73 E> */ B(TestGreaterThan), R(arg0), U8(2),
|
2016-08-30 10:21:02 +00:00
|
|
|
B(JumpIfFalse), U8(10),
|
2016-08-15 13:10:41 +00:00
|
|
|
B(LdaZero),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 82 E> */ B(TestGreaterThan), R(arg1), U8(3),
|
2016-08-15 13:10:41 +00:00
|
|
|
B(JumpIfFalse), U8(4),
|
|
|
|
/* 93 S> */ B(LdaZero),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 102 S> */ B(Return),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 118 S> */ B(LdaSmi), I8(-1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 128 S> */ B(Return),
|
2016-08-15 13:10:41 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
/* 133 S> */ B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|