blob: 09a0f5a1b6a1581760e8096eadcb6c6c2208f638 [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: no
9test function name: f
10
11---
12snippet: "
13 function f(arg1) { return function() { arg1 = 2; }; }
14 f();
15"
16frame size: 1
17parameter count: 2
18bytecode array length: 17
19bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010020 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
21 B(PushContext), R(0),
22 B(Ldar), R(arg0),
23 B(StaContextSlot), R(context), U8(4),
24 /* 10 E> */ B(StackCheck),
25 /* 19 S> */ B(CreateClosure), U8(0), U8(0),
26 /* 52 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010027]
28constant pool: [
29 InstanceType::SHARED_FUNCTION_INFO_TYPE,
30]
31handlers: [
32]
33
34---
35snippet: "
36 function f(arg1) { var a = function() { arg1 = 2; }; return arg1; }
37 f();
38"
39frame size: 2
40parameter count: 2
41bytecode array length: 22
42bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010043 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
44 B(PushContext), R(1),
45 B(Ldar), R(arg0),
46 B(StaContextSlot), R(context), U8(4),
47 /* 10 E> */ B(StackCheck),
48 /* 27 S> */ B(CreateClosure), U8(0), U8(0),
Ben Murdoch61f157c2016-09-16 13:49:30 +010049 B(Star), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +010050 /* 53 S> */ B(LdaContextSlot), R(context), U8(4),
51 /* 66 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010052]
53constant pool: [
54 InstanceType::SHARED_FUNCTION_INFO_TYPE,
55]
56handlers: [
57]
58
59---
60snippet: "
61 function f(a1, a2, a3, a4) { return function() { a1 = a3; }; }
62 f();
63"
64frame size: 1
65parameter count: 5
66bytecode array length: 22
67bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010068 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
69 B(PushContext), R(0),
70 B(Ldar), R(arg0),
71 B(StaContextSlot), R(context), U8(5),
72 B(Ldar), R(arg2),
73 B(StaContextSlot), R(context), U8(4),
74 /* 10 E> */ B(StackCheck),
75 /* 29 S> */ B(CreateClosure), U8(0), U8(0),
76 /* 61 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010077]
78constant pool: [
79 InstanceType::SHARED_FUNCTION_INFO_TYPE,
80]
81handlers: [
82]
83
84---
85snippet: "
86 function f() { var self = this; return function() { self = 2; }; }
87 f();
88"
89frame size: 1
90parameter count: 1
91bytecode array length: 17
92bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010093 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
94 B(PushContext), R(0),
95 /* 10 E> */ B(StackCheck),
96 /* 26 S> */ B(Ldar), R(this),
97 /* 26 E> */ B(StaContextSlot), R(context), U8(4),
98 /* 32 S> */ B(CreateClosure), U8(0), U8(0),
99 /* 65 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100100]
101constant pool: [
102 InstanceType::SHARED_FUNCTION_INFO_TYPE,
103]
104handlers: [
105]
106