OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 execute: yes | 6 execute: yes |
7 wrap: no | 7 wrap: no |
8 test function name: f | 8 test function name: f |
9 | 9 |
10 --- | 10 --- |
11 snippet: " | 11 snippet: " |
12 function Outer() { | 12 function Outer() { |
13 var outerVar = 1; | 13 var outerVar = 1; |
14 function Inner(innerArg) { | 14 function Inner(innerArg) { |
15 this.innerFunc = function() { return outerVar * innerArg; } | 15 this.innerFunc = function() { return outerVar * innerArg; } |
16 } | 16 } |
17 this.getInnerFunc = function() { return new Inner(1).innerFunc; } | 17 this.getInnerFunc = function() { return new Inner(1).innerFunc; } |
18 } | 18 } |
19 var f = new Outer().getInnerFunc(); | 19 var f = new Outer().getInnerFunc(); |
20 f(); | 20 f(); |
21 " | 21 " |
22 frame size: 2 | 22 frame size: 1 |
23 parameter count: 1 | 23 parameter count: 1 |
24 bytecode array length: 16 | 24 bytecode array length: 14 |
25 bytecodes: [ | 25 bytecodes: [ |
26 /* 97 E> */ B(StackCheck), | 26 /* 97 E> */ B(StackCheck), |
27 /* 102 S> */ B(LdrContextSlot), R(context), U8(1), R(0), | 27 /* 102 S> */ B(LdrContextSlot), R(context), U8(4), U8(1), R(0), |
28 B(LdrContextSlot), R(0), U8(4), R(1), | 28 /* 120 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), |
29 /* 120 E> */ B(LdaContextSlot), R(context), U8(4), | 29 B(Mul), R(0), U8(1), |
30 B(Mul), R(1), U8(1), | |
31 /* 130 S> */ B(Return), | 30 /* 130 S> */ B(Return), |
32 ] | 31 ] |
33 constant pool: [ | 32 constant pool: [ |
34 ] | 33 ] |
35 handlers: [ | 34 handlers: [ |
36 ] | 35 ] |
37 | 36 |
38 --- | 37 --- |
39 snippet: " | 38 snippet: " |
40 function Outer() { | 39 function Outer() { |
41 var outerVar = 1; | 40 var outerVar = 1; |
42 function Inner(innerArg) { | 41 function Inner(innerArg) { |
43 this.innerFunc = function() { outerVar = innerArg; } | 42 this.innerFunc = function() { outerVar = innerArg; } |
44 } | 43 } |
45 this.getInnerFunc = function() { return new Inner(1).innerFunc; } | 44 this.getInnerFunc = function() { return new Inner(1).innerFunc; } |
46 } | 45 } |
47 var f = new Outer().getInnerFunc(); | 46 var f = new Outer().getInnerFunc(); |
48 f(); | 47 f(); |
49 " | 48 " |
50 frame size: 2 | 49 frame size: 0 |
51 parameter count: 1 | 50 parameter count: 1 |
52 bytecode array length: 16 | 51 bytecode array length: 11 |
53 bytecodes: [ | 52 bytecodes: [ |
54 /* 97 E> */ B(StackCheck), | 53 /* 97 E> */ B(StackCheck), |
55 /* 102 S> */ B(LdrContextSlot), R(context), U8(4), R(0), | 54 /* 102 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), |
56 /* 111 E> */ B(LdrContextSlot), R(context), U8(1), R(1), | 55 /* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1), |
57 B(Ldar), R(0), | |
58 B(StaContextSlot), R(1), U8(4), | |
59 B(LdaUndefined), | 56 B(LdaUndefined), |
60 /* 123 S> */ B(Return), | 57 /* 123 S> */ B(Return), |
61 ] | 58 ] |
62 constant pool: [ | 59 constant pool: [ |
63 ] | 60 ] |
64 handlers: [ | 61 handlers: [ |
65 ] | 62 ] |
66 | 63 |
OLD | NEW |