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