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