2016-02-25 12:07:07 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
wrap: yes
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 0;
|
|
|
|
while (x != 10) {
|
|
|
|
x = x + 10;
|
|
|
|
}
|
|
|
|
return x;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2016-12-08 10:11:06 +00:00
|
|
|
bytecode array length: 25
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
|
|
|
/* 42 S> */ B(LdaZero),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 54 S> */ B(LdaSmi), I8(10),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 54 E> */ B(TestEqual), R(0), U8(0),
|
2016-12-08 10:11:06 +00:00
|
|
|
B(JumpIfTrue), U8(13),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 45 E> */ B(StackCheck),
|
2017-04-10 09:30:51 +00:00
|
|
|
/* 65 S> */ B(Ldar), R(0),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 71 E> */ B(AddSmi), I8(10), U8(1),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(JumpLoop), U8(15), I8(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 79 S> */ B(Ldar), R(0),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 88 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = false;
|
|
|
|
do {
|
|
|
|
x = !x;
|
|
|
|
} while(x == false);
|
|
|
|
return x;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2016-09-13 13:07:15 +00:00
|
|
|
bytecode array length: 22
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
|
|
|
/* 42 S> */ B(LdaFalse),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 49 E> */ B(StackCheck),
|
|
|
|
/* 56 S> */ B(Ldar), R(0),
|
2016-05-17 20:39:45 +00:00
|
|
|
B(ToBooleanLogicalNot),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 74 S> */ B(LdaFalse),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 74 E> */ B(TestEqual), R(0), U8(0),
|
2016-09-13 13:07:15 +00:00
|
|
|
B(JumpIfFalse), U8(5),
|
2017-01-25 17:39:24 +00:00
|
|
|
B(JumpLoop), U8(12), I8(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 85 S> */ B(Ldar), R(0),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 94 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 101;
|
|
|
|
return void(x * 3);
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2017-07-17 19:02:35 +00:00
|
|
|
bytecode array length: 10
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 S> */ B(LdaSmi), I8(101),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2017-07-27 12:45:00 +00:00
|
|
|
/* 61 S> */ B(MulSmi), I8(3), U8(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(LdaUndefined),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 66 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 1234;
|
|
|
|
var y = void (x * x - 1);
|
|
|
|
return y;
|
|
|
|
"
|
2017-04-10 09:30:51 +00:00
|
|
|
frame size: 2
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2017-07-17 19:02:35 +00:00
|
|
|
bytecode array length: 17
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 S> */ B(Wide), B(LdaSmi), I16(1234),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2017-10-19 15:12:42 +00:00
|
|
|
/* 64 S> */ B(Mul), R(0), U8(1),
|
|
|
|
/* 68 E> */ B(SubSmi), I8(1), U8(0),
|
2016-11-10 10:41:48 +00:00
|
|
|
B(LdaUndefined),
|
|
|
|
B(Star), R(1),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 83 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 13;
|
|
|
|
return ~x;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2017-09-12 18:24:58 +00:00
|
|
|
bytecode array length: 8
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 S> */ B(LdaSmi), I8(13),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2017-09-12 18:24:58 +00:00
|
|
|
/* 53 S> */ B(BitwiseNot), U8(0),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 56 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 13;
|
|
|
|
return +x;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2017-09-11 16:57:39 +00:00
|
|
|
bytecode array length: 8
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 S> */ B(LdaSmi), I8(13),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2017-09-11 16:57:39 +00:00
|
|
|
/* 53 S> */ B(ToNumber), U8(0),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 56 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var x = 13;
|
|
|
|
return -x;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2017-09-12 18:24:58 +00:00
|
|
|
bytecode array length: 8
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
2017-01-25 17:39:24 +00:00
|
|
|
/* 42 S> */ B(LdaSmi), I8(13),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2017-09-12 18:24:58 +00:00
|
|
|
/* 53 S> */ B(Negate), U8(0),
|
2017-07-14 17:50:09 +00:00
|
|
|
/* 56 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|