StringConcat.golden 4.45 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#
# Autogenerated by generate-bytecode-expectations.
#

---
wrap: yes

---
snippet: "
  var a = 1;
  var b = 2;
  return a + b + 'string';
"
frame size: 3
parameter count: 1
bytecode array length: 22
bytecodes: [
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaSmi), I8(1),
                B(Star), R(0),
  /*   53 S> */ B(LdaSmi), I8(2),
                B(Star), R(1),
  /*   56 S> */ B(Ldar), R(1),
24
  /*   65 E> */ B(Add), R(0), U8(0),
25 26
                B(Star), R(2),
                B(LdaConstant), U8(0),
27
  /*   69 E> */ B(Add), R(2), U8(1),
28
  /*   80 S> */ B(Return),
29 30 31 32 33 34 35 36 37 38 39 40 41
]
constant pool: [
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["string"],
]
handlers: [
]

---
snippet: "
  var a = 1;
  var b = 2;
  return 'string' + a + b;
"
42
frame size: 3
43
parameter count: 1
44
bytecode array length: 26
45 46 47 48 49 50 51 52 53
bytecodes: [
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaSmi), I8(1),
                B(Star), R(0),
  /*   53 S> */ B(LdaSmi), I8(2),
                B(Star), R(1),
  /*   56 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(Ldar), R(0),
54
  /*   72 E> */ B(Add), R(2), U8(0),
55
                B(Star), R(2),
56
                B(Ldar), R(1),
57
  /*   76 E> */ B(Add), R(2), U8(1),
58
  /*   80 S> */ B(Return),
59 60 61 62 63 64 65 66 67 68 69 70 71
]
constant pool: [
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["string"],
]
handlers: [
]

---
snippet: "
  var a = 1;
  var b = 2;
  return a + 'string' + b;
"
72
frame size: 3
73
parameter count: 1
74
bytecode array length: 22
75 76 77 78 79 80 81
bytecodes: [
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaSmi), I8(1),
                B(Star), R(0),
  /*   53 S> */ B(LdaSmi), I8(2),
                B(Star), R(1),
  /*   56 S> */ B(LdaConstant), U8(0),
82
  /*   65 E> */ B(Add), R(0), U8(0),
83
                B(Star), R(2),
84
                B(Ldar), R(1),
85
  /*   76 E> */ B(Add), R(2), U8(1),
86
  /*   80 S> */ B(Return),
87 88 89 90 91 92 93 94 95 96 97 98 99
]
constant pool: [
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["string"],
]
handlers: [
]

---
snippet: "
  var a = 1;
  var b = 2;
  return 'foo' + a + 'bar' + b + 'baz' + 1;
"
100
frame size: 3
101
parameter count: 1
102
bytecode array length: 43
103 104 105 106 107 108 109 110 111
bytecodes: [
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaSmi), I8(1),
                B(Star), R(0),
  /*   53 S> */ B(LdaSmi), I8(2),
                B(Star), R(1),
  /*   56 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(Ldar), R(0),
112
  /*   69 E> */ B(Add), R(2), U8(0),
113
                B(Star), R(2),
114
                B(LdaConstant), U8(1),
115
  /*   73 E> */ B(Add), R(2), U8(1),
116
                B(Star), R(2),
117
                B(Ldar), R(1),
118
  /*   81 E> */ B(Add), R(2), U8(2),
119
                B(Star), R(2),
120
                B(LdaConstant), U8(2),
121 122
  /*   85 E> */ B(Add), R(2), U8(3),
  /*   93 E> */ B(AddSmi), I8(1), U8(4),
123
  /*   97 S> */ B(Return),
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
]
constant pool: [
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["foo"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["bar"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["baz"],
]
handlers: [
]

---
snippet: "
  var a = 1;
  var b = 2;
  return (a + 'string') + ('string' + b);
"
139
frame size: 4
140
parameter count: 1
141
bytecode array length: 29
142 143 144 145 146 147 148
bytecodes: [
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaSmi), I8(1),
                B(Star), R(0),
  /*   53 S> */ B(LdaSmi), I8(2),
                B(Star), R(1),
  /*   56 S> */ B(LdaConstant), U8(0),
149
  /*   66 E> */ B(Add), R(0), U8(0),
150
                B(Star), R(2),
151
                B(LdaConstant), U8(0),
152
                B(Star), R(3),
153
                B(Ldar), R(1),
154 155
  /*   90 E> */ B(Add), R(3), U8(1),
  /*   78 E> */ B(Add), R(2), U8(2),
156
  /*   95 S> */ B(Return),
157 158 159 160 161 162 163 164 165 166 167 168 169 170
]
constant pool: [
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["string"],
]
handlers: [
]

---
snippet: "
  var a = 1;
  var b = 2;
  function foo(a, b) { };
  return 'string' + foo(a, b) + a + b;
"
171
frame size: 4
172
parameter count: 1
173
bytecode array length: 42
174
bytecodes: [
175
                B(CreateClosure), U8(0), U8(0), U8(2),
176 177 178 179 180 181 182 183
                B(Star), R(2),
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaSmi), I8(1),
                B(Star), R(0),
  /*   53 S> */ B(LdaSmi), I8(2),
                B(Star), R(1),
  /*   80 S> */ B(LdaConstant), U8(1),
                B(Star), R(3),
184 185
  /*   98 E> */ B(CallUndefinedReceiver2), R(2), R(0), R(1), U8(0),
  /*   96 E> */ B(Add), R(3), U8(2),
186
                B(Star), R(3),
187
                B(Ldar), R(0),
188
  /*  108 E> */ B(Add), R(3), U8(3),
189
                B(Star), R(3),
190
                B(Ldar), R(1),
191
  /*  112 E> */ B(Add), R(3), U8(4),
192
  /*  116 S> */ B(Return),
193 194 195 196 197 198 199 200
]
constant pool: [
  SHARED_FUNCTION_INFO_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["string"],
]
handlers: [
]