OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
6 | 6 |
7 #include <fstream> | 7 #include <fstream> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 } | 1566 } |
1567 | 1567 |
1568 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { | 1568 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { |
1569 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); | 1569 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); |
1570 Node* new_target = __ GetAccumulator(); | 1570 Node* new_target = __ GetAccumulator(); |
1571 Node* constructor_reg = __ BytecodeOperandReg(0); | 1571 Node* constructor_reg = __ BytecodeOperandReg(0); |
1572 Node* constructor = __ LoadRegister(constructor_reg); | 1572 Node* constructor = __ LoadRegister(constructor_reg); |
1573 Node* first_arg_reg = __ BytecodeOperandReg(1); | 1573 Node* first_arg_reg = __ BytecodeOperandReg(1); |
1574 Node* first_arg = __ RegisterLocation(first_arg_reg); | 1574 Node* first_arg = __ RegisterLocation(first_arg_reg); |
1575 Node* args_count = __ BytecodeOperandCount(2); | 1575 Node* args_count = __ BytecodeOperandCount(2); |
| 1576 Node* slot_id = __ BytecodeOperandIdx(3); |
| 1577 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1576 Node* context = __ GetContext(); | 1578 Node* context = __ GetContext(); |
1577 Node* result = | 1579 Node* result = __ CallConstruct(constructor, context, new_target, first_arg, |
1578 __ CallConstruct(constructor, context, new_target, first_arg, args_count); | 1580 args_count, slot_id, type_feedback_vector); |
1579 __ SetAccumulator(result); | 1581 __ SetAccumulator(result); |
1580 __ Dispatch(); | 1582 __ Dispatch(); |
1581 } | 1583 } |
1582 | 1584 |
1583 // New <constructor> <first_arg> <arg_count> | 1585 // New <constructor> <first_arg> <arg_count> |
1584 // | 1586 // |
1585 // Call operator new with |constructor| and the first argument in | 1587 // Call operator new with |constructor| and the first argument in |
1586 // register |first_arg| and |arg_count| arguments in subsequent | 1588 // register |first_arg| and |arg_count| arguments in subsequent |
1587 // registers. The new.target is in the accumulator. | 1589 // registers. The new.target is in the accumulator. |
1588 // | 1590 // |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2460 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2462 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2461 __ SmiTag(new_state)); | 2463 __ SmiTag(new_state)); |
2462 __ SetAccumulator(old_state); | 2464 __ SetAccumulator(old_state); |
2463 | 2465 |
2464 __ Dispatch(); | 2466 __ Dispatch(); |
2465 } | 2467 } |
2466 | 2468 |
2467 } // namespace interpreter | 2469 } // namespace interpreter |
2468 } // namespace internal | 2470 } // namespace internal |
2469 } // namespace v8 | 2471 } // namespace v8 |
OLD | NEW |