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(); | |
1290 Node* context = __ GetContext(); | 1288 Node* context = __ GetContext(); |
1291 Node* result = __ CallConstruct(constructor, context, new_target, first_arg, | 1289 Node* result = |
1292 args_count, slot_id, type_feedback_vector); | 1290 __ CallConstruct(constructor, context, new_target, first_arg, args_count); |
1293 __ SetAccumulator(result); | 1291 __ SetAccumulator(result); |
1294 __ Dispatch(); | 1292 __ Dispatch(); |
1295 } | 1293 } |
1296 | 1294 |
1297 // New <constructor> <first_arg> <arg_count> | 1295 // New <constructor> <first_arg> <arg_count> |
1298 // | 1296 // |
1299 // Call operator new with |constructor| and the first argument in | 1297 // Call operator new with |constructor| and the first argument in |
1300 // register |first_arg| and |arg_count| arguments in subsequent | 1298 // register |first_arg| and |arg_count| arguments in subsequent |
1301 // registers. The new.target is in the accumulator. | 1299 // registers. The new.target is in the accumulator. |
1302 // | 1300 // |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2037 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2035 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2038 __ SmiTag(new_state)); | 2036 __ SmiTag(new_state)); |
2039 __ SetAccumulator(old_state); | 2037 __ SetAccumulator(old_state); |
2040 | 2038 |
2041 __ Dispatch(); | 2039 __ Dispatch(); |
2042 } | 2040 } |
2043 | 2041 |
2044 } // namespace interpreter | 2042 } // namespace interpreter |
2045 } // namespace internal | 2043 } // namespace internal |
2046 } // namespace v8 | 2044 } // namespace v8 |
OLD | NEW |