2016-02-25 12:07:07 +00:00
|
|
|
#
|
|
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
|
|
#
|
|
|
|
|
|
|
|
---
|
|
|
|
execute: yes
|
|
|
|
wrap: yes
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var ld_a = 1;
|
|
|
|
while(true) {
|
|
|
|
ld_a = ld_a + ld_a;
|
|
|
|
if (ld_a > 10) break;
|
|
|
|
}
|
|
|
|
return ld_a;
|
|
|
|
"
|
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: 28
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
|
|
|
/* 45 S> */ B(LdaSmi), U8(1),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 48 E> */ B(StackCheck),
|
2016-06-09 13:32:33 +00:00
|
|
|
/* 64 S> */ B(Ldar), R(0),
|
2016-08-08 01:15:22 +00:00
|
|
|
/* 78 E> */ B(Add), R(0), U8(1),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 86 S> */ B(LdaSmi), U8(10),
|
2016-08-30 10:21:02 +00:00
|
|
|
/* 95 E> */ B(TestGreaterThan), R(0), U8(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(4),
|
2016-09-13 13:07:15 +00:00
|
|
|
/* 101 S> */ B(Jump), U8(5),
|
|
|
|
B(JumpLoop), U8(-17), U8(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 110 S> */ B(Ldar), R(0),
|
|
|
|
/* 123 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var ld_a = 1;
|
|
|
|
do {
|
|
|
|
ld_a = ld_a + ld_a;
|
|
|
|
if (ld_a > 10) continue;
|
|
|
|
} while(false);
|
|
|
|
return ld_a;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2016-08-30 10:21:02 +00:00
|
|
|
bytecode array length: 24
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
|
|
|
/* 45 S> */ B(LdaSmi), U8(1),
|
2016-06-09 13:32:33 +00:00
|
|
|
B(Star), R(0),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 48 E> */ B(StackCheck),
|
2016-08-02 09:16:03 +00:00
|
|
|
/* 55 S> */ B(Nop),
|
2016-08-08 01:15:22 +00:00
|
|
|
/* 69 E> */ B(Add), R(0), U8(1),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 77 S> */ B(LdaSmi), U8(10),
|
2016-08-30 10:21:02 +00:00
|
|
|
/* 86 E> */ B(TestGreaterThan), R(0), U8(2),
|
2016-05-11 12:21:56 +00:00
|
|
|
B(JumpIfFalse), U8(4),
|
|
|
|
/* 92 S> */ B(Jump), U8(2),
|
|
|
|
/* 118 S> */ B(Ldar), R(0),
|
|
|
|
/* 131 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|
|
|
|
---
|
|
|
|
snippet: "
|
|
|
|
var ld_a = 1;
|
|
|
|
ld_a = ld_a + ld_a;
|
|
|
|
return ld_a;
|
|
|
|
"
|
2016-05-27 15:57:35 +00:00
|
|
|
frame size: 1
|
2016-02-25 12:07:07 +00:00
|
|
|
parameter count: 1
|
2016-08-08 01:15:22 +00:00
|
|
|
bytecode array length: 13
|
2016-02-25 12:07:07 +00:00
|
|
|
bytecodes: [
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 30 E> */ B(StackCheck),
|
|
|
|
/* 45 S> */ B(LdaSmi), U8(1),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
2016-05-27 15:57:35 +00:00
|
|
|
/* 50 S> */ B(Nop),
|
2016-08-08 01:15:22 +00:00
|
|
|
/* 64 E> */ B(Add), R(0), U8(1),
|
2016-05-23 13:31:53 +00:00
|
|
|
B(Star), R(0),
|
|
|
|
/* 72 S> */ B(Nop),
|
2016-05-11 12:21:56 +00:00
|
|
|
/* 85 S> */ B(Return),
|
2016-02-25 12:07:07 +00:00
|
|
|
]
|
|
|
|
constant pool: [
|
|
|
|
]
|
|
|
|
handlers: [
|
|
|
|
]
|
|
|
|
|