OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/interpreter/bytecode-array-builder.h" | 8 #include "src/interpreter/bytecode-array-builder.h" |
9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 builder.LoadUndefined() | 225 builder.LoadUndefined() |
226 .CompareOperation(Token::Value::EQ, reg, 1) | 226 .CompareOperation(Token::Value::EQ, reg, 1) |
227 .LoadNull() | 227 .LoadNull() |
228 .CompareOperation(Token::Value::EQ, reg, 1) | 228 .CompareOperation(Token::Value::EQ, reg, 1) |
229 .LoadUndefined() | 229 .LoadUndefined() |
230 .CompareOperation(Token::Value::EQ_STRICT, reg, 1) | 230 .CompareOperation(Token::Value::EQ_STRICT, reg, 1) |
231 .LoadNull() | 231 .LoadNull() |
232 .CompareOperation(Token::Value::EQ_STRICT, reg, 1); | 232 .CompareOperation(Token::Value::EQ_STRICT, reg, 1); |
233 | 233 |
234 // Emit conversion operator invocations. | 234 // Emit conversion operator invocations. |
235 builder.ConvertAccumulatorToNumber(reg) | 235 builder.ConvertAccumulatorToNumber(reg, 1) |
236 .ConvertAccumulatorToObject(reg) | 236 .ConvertAccumulatorToObject(reg) |
237 .ConvertAccumulatorToName(reg); | 237 .ConvertAccumulatorToName(reg); |
238 | 238 |
239 // Emit GetSuperConstructor. | 239 // Emit GetSuperConstructor. |
240 builder.GetSuperConstructor(reg); | 240 builder.GetSuperConstructor(reg); |
241 | 241 |
242 // Short jumps with Imm8 operands | 242 // Short jumps with Imm8 operands |
243 { | 243 { |
244 BytecodeLabel start, after_jump1, after_jump2, after_jump3, after_jump4, | 244 BytecodeLabel start, after_jump1, after_jump2, after_jump3, after_jump4, |
245 after_jump5, after_jump6, after_jump7, after_jump8, after_jump9, | 245 after_jump5, after_jump6, after_jump7, after_jump8, after_jump9, |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 iterator.Advance(); | 770 iterator.Advance(); |
771 } | 771 } |
772 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 772 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
773 iterator.Advance(); | 773 iterator.Advance(); |
774 CHECK(iterator.done()); | 774 CHECK(iterator.done()); |
775 } | 775 } |
776 | 776 |
777 } // namespace interpreter | 777 } // namespace interpreter |
778 } // namespace internal | 778 } // namespace internal |
779 } // namespace v8 | 779 } // namespace v8 |
OLD | NEW |