OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 wrap: no | 6 wrap: no |
7 test function name: f | 7 test function name: f |
8 | 8 |
9 --- | 9 --- |
10 snippet: " | 10 snippet: " |
11 function f(arg1) { return function() { arg1 = 2; }; } | 11 function f(arg1) { return function() { arg1 = 2; }; } |
12 f(); | 12 f(); |
13 " | 13 " |
14 frame size: 1 | 14 frame size: 1 |
15 parameter count: 2 | 15 parameter count: 2 |
16 bytecode array length: 15 | 16 bytecode array length: 13 |
17 bytecodes: [ | 17 bytecodes: [ |
18 B(CreateFunctionContext), U8(1), | 18 B(CreateFunctionContext), U8(1), |
19 B(PushContext), R(0), | 19 B(PushContext), R(0), |
20 B(Ldar), R(arg0), | 20 B(Ldar), R(arg0), |
21 B(StaContextSlot), R(context), U8(4), U8(0), | 21 B(StaCurrentContextSlot), U8(4), |
22 /* 10 E> */ B(StackCheck), | 22 /* 10 E> */ B(StackCheck), |
23 /* 19 S> */ B(CreateClosure), U8(0), U8(2), | 23 /* 19 S> */ B(CreateClosure), U8(0), U8(2), |
24 /* 52 S> */ B(Return), | 24 /* 52 S> */ B(Return), |
25 ] | 25 ] |
26 constant pool: [ | 26 constant pool: [ |
27 SHARED_FUNCTION_INFO_TYPE, | 27 SHARED_FUNCTION_INFO_TYPE, |
28 ] | 28 ] |
29 handlers: [ | 29 handlers: [ |
30 ] | 30 ] |
31 | 31 |
32 --- | 32 --- |
33 snippet: " | 33 snippet: " |
34 function f(arg1) { var a = function() { arg1 = 2; }; return arg1; } | 34 function f(arg1) { var a = function() { arg1 = 2; }; return arg1; } |
35 f(); | 35 f(); |
36 " | 36 " |
37 frame size: 2 | 37 frame size: 2 |
38 parameter count: 2 | 38 parameter count: 2 |
39 bytecode array length: 21 | 39 bytecode array length: 17 |
40 bytecodes: [ | 40 bytecodes: [ |
41 B(CreateFunctionContext), U8(1), | 41 B(CreateFunctionContext), U8(1), |
42 B(PushContext), R(1), | 42 B(PushContext), R(1), |
43 B(Ldar), R(arg0), | 43 B(Ldar), R(arg0), |
44 B(StaContextSlot), R(context), U8(4), U8(0), | 44 B(StaCurrentContextSlot), U8(4), |
45 /* 10 E> */ B(StackCheck), | 45 /* 10 E> */ B(StackCheck), |
46 /* 27 S> */ B(CreateClosure), U8(0), U8(2), | 46 /* 27 S> */ B(CreateClosure), U8(0), U8(2), |
47 B(Star), R(0), | 47 B(Star), R(0), |
48 /* 53 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), | 48 /* 53 S> */ B(LdaCurrentContextSlot), U8(4), |
49 /* 66 S> */ B(Return), | 49 /* 66 S> */ B(Return), |
50 ] | 50 ] |
51 constant pool: [ | 51 constant pool: [ |
52 SHARED_FUNCTION_INFO_TYPE, | 52 SHARED_FUNCTION_INFO_TYPE, |
53 ] | 53 ] |
54 handlers: [ | 54 handlers: [ |
55 ] | 55 ] |
56 | 56 |
57 --- | 57 --- |
58 snippet: " | 58 snippet: " |
59 function f(a1, a2, a3, a4) { return function() { a1 = a3; }; } | 59 function f(a1, a2, a3, a4) { return function() { a1 = a3; }; } |
60 f(); | 60 f(); |
61 " | 61 " |
62 frame size: 1 | 62 frame size: 1 |
63 parameter count: 5 | 63 parameter count: 5 |
64 bytecode array length: 21 | 64 bytecode array length: 17 |
65 bytecodes: [ | 65 bytecodes: [ |
66 B(CreateFunctionContext), U8(2), | 66 B(CreateFunctionContext), U8(2), |
67 B(PushContext), R(0), | 67 B(PushContext), R(0), |
68 B(Ldar), R(arg0), | 68 B(Ldar), R(arg0), |
69 B(StaContextSlot), R(context), U8(5), U8(0), | 69 B(StaCurrentContextSlot), U8(5), |
70 B(Ldar), R(arg2), | 70 B(Ldar), R(arg2), |
71 B(StaContextSlot), R(context), U8(4), U8(0), | 71 B(StaCurrentContextSlot), U8(4), |
72 /* 10 E> */ B(StackCheck), | 72 /* 10 E> */ B(StackCheck), |
73 /* 29 S> */ B(CreateClosure), U8(0), U8(2), | 73 /* 29 S> */ B(CreateClosure), U8(0), U8(2), |
74 /* 61 S> */ B(Return), | 74 /* 61 S> */ B(Return), |
75 ] | 75 ] |
76 constant pool: [ | 76 constant pool: [ |
77 SHARED_FUNCTION_INFO_TYPE, | 77 SHARED_FUNCTION_INFO_TYPE, |
78 ] | 78 ] |
79 handlers: [ | 79 handlers: [ |
80 ] | 80 ] |
81 | 81 |
82 --- | 82 --- |
83 snippet: " | 83 snippet: " |
84 function f() { var self = this; return function() { self = 2; }; } | 84 function f() { var self = this; return function() { self = 2; }; } |
85 f(); | 85 f(); |
86 " | 86 " |
87 frame size: 1 | 87 frame size: 1 |
88 parameter count: 1 | 88 parameter count: 1 |
89 bytecode array length: 15 | 89 bytecode array length: 13 |
90 bytecodes: [ | 90 bytecodes: [ |
91 B(CreateFunctionContext), U8(1), | 91 B(CreateFunctionContext), U8(1), |
92 B(PushContext), R(0), | 92 B(PushContext), R(0), |
93 /* 10 E> */ B(StackCheck), | 93 /* 10 E> */ B(StackCheck), |
94 /* 26 S> */ B(Ldar), R(this), | 94 /* 26 S> */ B(Ldar), R(this), |
95 /* 26 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 95 /* 26 E> */ B(StaCurrentContextSlot), U8(4), |
96 /* 32 S> */ B(CreateClosure), U8(0), U8(2), | 96 /* 32 S> */ B(CreateClosure), U8(0), U8(2), |
97 /* 65 S> */ B(Return), | 97 /* 65 S> */ B(Return), |
98 ] | 98 ] |
99 constant pool: [ | 99 constant pool: [ |
100 SHARED_FUNCTION_INFO_TYPE, | 100 SHARED_FUNCTION_INFO_TYPE, |
101 ] | 101 ] |
102 handlers: [ | 102 handlers: [ |
103 ] | 103 ] |
104 | 104 |
OLD | NEW |