blob: 1cfdea84e2d4c86cabfc8a96c8538f560ceb22f3 [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001#
2# Autogenerated by generate-bytecode-expectations.
3#
4
5---
6pool type: mixed
7execute: yes
8wrap: yes
9
10---
11snippet: "
12 const x = 10; function f1() {return x;}
13"
14frame size: 2
15parameter count: 1
16bytecode array length: 24
17bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010018 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
19 B(PushContext), R(1),
20 B(LdaTheHole),
21 B(StaContextSlot), R(context), U8(4),
22 B(CreateClosure), U8(0), U8(0),
23 B(Star), R(0),
24 /* 30 E> */ B(StackCheck),
25 /* 44 S> */ B(LdaSmi), U8(10),
26 /* 44 E> */ B(StaContextSlot), R(context), U8(4),
27 B(LdaUndefined),
28 /* 74 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010029]
30constant pool: [
31 InstanceType::SHARED_FUNCTION_INFO_TYPE,
32]
33handlers: [
34]
35
36---
37snippet: "
38 const x = 10; function f1() {return x;} return x;
39"
40frame size: 3
41parameter count: 1
42bytecode array length: 37
43bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010044 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
45 B(PushContext), R(1),
46 B(LdaTheHole),
47 B(StaContextSlot), R(context), U8(4),
48 B(CreateClosure), U8(0), U8(0),
49 B(Star), R(0),
50 /* 30 E> */ B(StackCheck),
51 /* 44 S> */ B(LdaSmi), U8(10),
52 /* 44 E> */ B(StaContextSlot), R(context), U8(4),
53 /* 74 S> */ B(LdaContextSlot), R(context), U8(4),
54 B(JumpIfNotHole), U8(11),
55 B(LdaConstant), U8(1),
56 B(Star), R(2),
57 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
58 /* 84 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010059]
60constant pool: [
61 InstanceType::SHARED_FUNCTION_INFO_TYPE,
62 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
63]
64handlers: [
65]
66
67---
68snippet: "
69 const x = (x = 20); function f1() {return x;}
70"
71frame size: 4
72parameter count: 1
73bytecode array length: 50
74bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010075 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
76 B(PushContext), R(1),
77 B(LdaTheHole),
78 B(StaContextSlot), R(context), U8(4),
79 B(CreateClosure), U8(0), U8(0),
80 B(Star), R(0),
81 /* 30 E> */ B(StackCheck),
82 /* 47 S> */ B(LdaSmi), U8(20),
Ben Murdoch61f157c2016-09-16 13:49:30 +010083 B(Star), R(2),
84 /* 47 E> */ B(LdaContextSlot), R(context), U8(4),
Ben Murdochc5610432016-08-08 18:44:38 +010085 B(JumpIfNotHole), U8(11),
86 B(LdaConstant), U8(1),
87 B(Star), R(3),
88 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
89 B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
90 B(Ldar), R(2),
91 B(StaContextSlot), R(context), U8(4),
92 /* 47 E> */ B(StaContextSlot), R(context), U8(4),
93 B(LdaUndefined),
94 /* 80 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010095]
96constant pool: [
97 InstanceType::SHARED_FUNCTION_INFO_TYPE,
98 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
99]
100handlers: [
101]
102
103---
104snippet: "
105 const x = 10; x = 20; function f1() {return x;}
106"
107frame size: 4
108parameter count: 1
109bytecode array length: 52
110bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +0100111 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
112 B(PushContext), R(1),
113 B(LdaTheHole),
114 B(StaContextSlot), R(context), U8(4),
115 B(CreateClosure), U8(0), U8(0),
116 B(Star), R(0),
117 /* 30 E> */ B(StackCheck),
118 /* 44 S> */ B(LdaSmi), U8(10),
119 /* 44 E> */ B(StaContextSlot), R(context), U8(4),
120 /* 48 S> */ B(LdaSmi), U8(20),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100121 B(Star), R(2),
122 /* 50 E> */ B(LdaContextSlot), R(context), U8(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100123 B(JumpIfNotHole), U8(11),
124 B(LdaConstant), U8(1),
125 B(Star), R(3),
126 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
127 B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
128 B(Ldar), R(2),
129 B(StaContextSlot), R(context), U8(4),
130 B(LdaUndefined),
131 /* 82 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100132]
133constant pool: [
134 InstanceType::SHARED_FUNCTION_INFO_TYPE,
135 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
136]
137handlers: [
138]
139