2016-02-25 12:07:07 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
pool type: mixed
|
|
|
|
execute: yes
|
|
|
|
wrap: yes
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 0;
|
|
|
|
label: {
|
|
|
|
x = x + 1;
|
|
|
|
break label;
|
|
|
|
x = x + 1;
|
|
|
|
}
|
|
|
|
return x;
|
|
|
|
"
|
|
|
|
frame size: 2
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 17
|
|
|
|
bytecodes: [
|
|
|
|
B(StackCheck),
|
|
|
|
B(LdaZero),
|
|
|
|
B(Star), R(0),
|
|
|
|
B(Star), R(1),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(1),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(Add), R(1),
|
|
|
|
B(Star), R(0),
|
|
|
|
B(Jump), U8(2),
|
|
|
|
B(Ldar), R(0),
|
|
|
|
B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var sum = 0;
|
|
|
|
outer: {
|
|
|
|
for (var x = 0; x < 10; ++x) {
|
|
|
|
for (var y = 0; y < 3; ++y) {
|
|
|
|
++sum;
|
|
|
|
if (x + y == 12) { break outer; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sum;
|
|
|
|
"
|
|
|
|
frame size: 5
|
|
|
|
parameter count: 1
|
2016-04-22 10:35:42 +00:00
|
|
|
bytecode array length: 72
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
|
|
|
B(StackCheck),
|
|
|
|
B(LdaZero),
|
|
|
|
B(Star), R(0),
|
|
|
|
B(LdaZero),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(Ldar), R(1),
|
|
|
|
B(Star), R(3),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(10),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(TestLessThan), R(3),
|
2016-04-22 10:35:42 +00:00
|
|
|
B(JumpIfFalse), U8(54),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(StackCheck),
|
|
|
|
B(LdaZero),
|
|
|
|
B(Star), R(2),
|
|
|
|
B(Ldar), R(2),
|
|
|
|
B(Star), R(3),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(3),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(TestLessThan), R(3),
|
2016-04-22 10:35:42 +00:00
|
|
|
B(JumpIfFalse), U8(33),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(StackCheck),
|
|
|
|
B(Ldar), R(0),
|
|
|
|
B(Inc),
|
|
|
|
B(Star), R(0),
|
|
|
|
B(Ldar), R(1),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(Ldar), R(2),
|
|
|
|
B(Add), R(3),
|
|
|
|
B(Star), R(4),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(12),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(TestEqual), R(4),
|
|
|
|
B(JumpIfFalse), U8(4),
|
2016-04-22 10:35:42 +00:00
|
|
|
B(Jump), U8(16),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(Ldar), R(2),
|
|
|
|
B(Inc),
|
|
|
|
B(Star), R(2),
|
2016-04-22 10:35:42 +00:00
|
|
|
B(Jump), U8(-39),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(Ldar), R(1),
|
|
|
|
B(Inc),
|
|
|
|
B(Star), R(1),
|
2016-04-22 10:35:42 +00:00
|
|
|
B(Jump), U8(-60),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(Ldar), R(0),
|
|
|
|
B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
outer: {
|
|
|
|
let y = 10;
|
|
|
|
function f() { return y; }
|
|
|
|
break outer;
|
|
|
|
}
|
|
|
|
"
|
|
|
|
frame size: 5
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 51
|
|
|
|
bytecodes: [
|
|
|
|
B(StackCheck),
|
|
|
|
B(LdaConstant), U8(0),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(Ldar), R(closure),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2),
|
|
|
|
B(PushContext), R(2),
|
|
|
|
B(LdaTheHole),
|
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(CreateClosure), U8(1), U8(0),
|
|
|
|
B(Star), R(0),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(10),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(Ldar), R(0),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(2),
|
|
|
|
B(Star), R(3),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(Jump), U8(2),
|
|
|
|
B(PopContext), R(2),
|
|
|
|
B(LdaUndefined),
|
|
|
|
B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
InstanceType::FIXED_ARRAY_TYPE,
|
|
|
|
InstanceType::SHARED_FUNCTION_INFO_TYPE,
|
|
|
|
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
let x = 1;
|
|
|
|
outer: {
|
|
|
|
inner: {
|
|
|
|
let y = 2;
|
|
|
|
function f() { return x + y; }
|
|
|
|
if (y) break outer;
|
|
|
|
y = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
x = 4;
|
|
|
|
"
|
|
|
|
frame size: 6
|
|
|
|
parameter count: 1
|
|
|
|
bytecode array length: 131
|
|
|
|
bytecodes: [
|
|
|
|
B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
|
|
|
|
B(PushContext), R(2),
|
|
|
|
B(LdaTheHole),
|
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(StackCheck),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(1),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(LdaConstant), U8(0),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(Ldar), R(closure),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
|
|
|
|
B(PushContext), R(3),
|
|
|
|
B(LdaTheHole),
|
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(CreateClosure), U8(1), U8(0),
|
|
|
|
B(Star), R(0),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(2),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(Ldar), R(0),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(2),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
|
|
|
|
B(Star), R(1),
|
|
|
|
B(LdaContextSlot), R(context), U8(4),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(3),
|
|
|
|
B(Star), R(4),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
|
|
|
|
B(JumpIfToBooleanFalse), U8(6),
|
|
|
|
B(PopContext), R(3),
|
|
|
|
B(Jump), U8(27),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(3),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaContextSlot), R(context), U8(4),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(3),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
|
|
|
|
B(Ldar), R(4),
|
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(PopContext), R(3),
|
2016-03-21 17:08:21 +00:00
|
|
|
B(LdaSmi), U8(4),
|
2016-02-25 12:07:07 +00:00
|
|
|
B(Star), R(4),
|
|
|
|
B(LdaContextSlot), R(context), U8(4),
|
|
|
|
B(JumpIfNotHole), U8(11),
|
|
|
|
B(LdaConstant), U8(4),
|
|
|
|
B(Star), R(5),
|
|
|
|
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
|
|
|
|
B(Ldar), R(4),
|
|
|
|
B(StaContextSlot), R(context), U8(4),
|
|
|
|
B(LdaUndefined),
|
|
|
|
B(Return),
|
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
InstanceType::FIXED_ARRAY_TYPE,
|
|
|
|
InstanceType::SHARED_FUNCTION_INFO_TYPE,
|
|
|
|
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
|
|
|
|
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
|
|
|
|
InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|