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 | 8 |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 } | 1278 } |
1279 | 1279 |
1280 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { | 1280 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { |
1281 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); | 1281 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); |
1282 Node* new_target = __ GetAccumulator(); | 1282 Node* new_target = __ GetAccumulator(); |
1283 Node* constructor_reg = __ BytecodeOperandReg(0); | 1283 Node* constructor_reg = __ BytecodeOperandReg(0); |
1284 Node* constructor = __ LoadRegister(constructor_reg); | 1284 Node* constructor = __ LoadRegister(constructor_reg); |
1285 Node* first_arg_reg = __ BytecodeOperandReg(1); | 1285 Node* first_arg_reg = __ BytecodeOperandReg(1); |
1286 Node* first_arg = __ RegisterLocation(first_arg_reg); | 1286 Node* first_arg = __ RegisterLocation(first_arg_reg); |
1287 Node* args_count = __ BytecodeOperandCount(2); | 1287 Node* args_count = __ BytecodeOperandCount(2); |
| 1288 Node* slot_id = __ BytecodeOperandIdx(3); |
| 1289 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1288 Node* context = __ GetContext(); | 1290 Node* context = __ GetContext(); |
1289 Node* result = | 1291 Node* result = __ CallConstruct(constructor, context, new_target, first_arg, |
1290 __ CallConstruct(constructor, context, new_target, first_arg, args_count); | 1292 args_count, slot_id, type_feedback_vector); |
1291 __ SetAccumulator(result); | 1293 __ SetAccumulator(result); |
1292 __ Dispatch(); | 1294 __ Dispatch(); |
1293 } | 1295 } |
1294 | 1296 |
1295 // New <constructor> <first_arg> <arg_count> | 1297 // New <constructor> <first_arg> <arg_count> |
1296 // | 1298 // |
1297 // Call operator new with |constructor| and the first argument in | 1299 // Call operator new with |constructor| and the first argument in |
1298 // register |first_arg| and |arg_count| arguments in subsequent | 1300 // register |first_arg| and |arg_count| arguments in subsequent |
1299 // registers. The new.target is in the accumulator. | 1301 // registers. The new.target is in the accumulator. |
1300 // | 1302 // |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2035 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2037 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2036 __ SmiTag(new_state)); | 2038 __ SmiTag(new_state)); |
2037 __ SetAccumulator(old_state); | 2039 __ SetAccumulator(old_state); |
2038 | 2040 |
2039 __ Dispatch(); | 2041 __ Dispatch(); |
2040 } | 2042 } |
2041 | 2043 |
2042 } // namespace interpreter | 2044 } // namespace interpreter |
2043 } // namespace internal | 2045 } // namespace internal |
2044 } // namespace v8 | 2046 } // namespace v8 |
OLD | NEW |