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 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 } | 1298 } |
1299 | 1299 |
1300 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { | 1300 void Interpreter::DoCallConstruct(InterpreterAssembler* assembler) { |
1301 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); | 1301 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); |
1302 Node* new_target = __ GetAccumulator(); | 1302 Node* new_target = __ GetAccumulator(); |
1303 Node* constructor_reg = __ BytecodeOperandReg(0); | 1303 Node* constructor_reg = __ BytecodeOperandReg(0); |
1304 Node* constructor = __ LoadRegister(constructor_reg); | 1304 Node* constructor = __ LoadRegister(constructor_reg); |
1305 Node* first_arg_reg = __ BytecodeOperandReg(1); | 1305 Node* first_arg_reg = __ BytecodeOperandReg(1); |
1306 Node* first_arg = __ RegisterLocation(first_arg_reg); | 1306 Node* first_arg = __ RegisterLocation(first_arg_reg); |
1307 Node* args_count = __ BytecodeOperandCount(2); | 1307 Node* args_count = __ BytecodeOperandCount(2); |
| 1308 Node* slot_id = __ BytecodeOperandIdx(3); |
| 1309 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1308 Node* context = __ GetContext(); | 1310 Node* context = __ GetContext(); |
1309 Node* result = | 1311 Node* result = __ CallConstruct(constructor, context, new_target, first_arg, |
1310 __ CallConstruct(constructor, context, new_target, first_arg, args_count); | 1312 args_count, slot_id, type_feedback_vector); |
1311 __ SetAccumulator(result); | 1313 __ SetAccumulator(result); |
1312 __ Dispatch(); | 1314 __ Dispatch(); |
1313 } | 1315 } |
1314 | 1316 |
1315 // New <constructor> <first_arg> <arg_count> | 1317 // New <constructor> <first_arg> <arg_count> |
1316 // | 1318 // |
1317 // Call operator new with |constructor| and the first argument in | 1319 // Call operator new with |constructor| and the first argument in |
1318 // register |first_arg| and |arg_count| arguments in subsequent | 1320 // register |first_arg| and |arg_count| arguments in subsequent |
1319 // registers. The new.target is in the accumulator. | 1321 // registers. The new.target is in the accumulator. |
1320 // | 1322 // |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2180 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2182 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2181 __ SmiTag(new_state)); | 2183 __ SmiTag(new_state)); |
2182 __ SetAccumulator(old_state); | 2184 __ SetAccumulator(old_state); |
2183 | 2185 |
2184 __ Dispatch(); | 2186 __ Dispatch(); |
2185 } | 2187 } |
2186 | 2188 |
2187 } // namespace interpreter | 2189 } // namespace interpreter |
2188 } // namespace internal | 2190 } // namespace internal |
2189 } // namespace v8 | 2191 } // namespace v8 |
OLD | NEW |