| 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/compiler/interpreter-assembler.h" | 5 #include "src/compiler/interpreter-assembler.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 kMachAnyTagged, RegisterFileRawPointer(), | 345 kMachAnyTagged, RegisterFileRawPointer(), |
| 346 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 346 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
| 347 Node* shared_info = | 347 Node* shared_info = |
| 348 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); | 348 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); |
| 349 Node* vector = | 349 Node* vector = |
| 350 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); | 350 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); |
| 351 return vector; | 351 return vector; |
| 352 } | 352 } |
| 353 | 353 |
| 354 | 354 |
| 355 Node* InterpreterAssembler::CallConstruct(Node* original_constructor, | 355 Node* InterpreterAssembler::CallConstruct(Node* new_target, Node* constructor, |
| 356 Node* constructor, Node* first_arg, | 356 Node* first_arg, Node* arg_count) { |
| 357 Node* arg_count) { | |
| 358 Callable callable = CodeFactory::InterpreterPushArgsAndConstruct(isolate()); | 357 Callable callable = CodeFactory::InterpreterPushArgsAndConstruct(isolate()); |
| 359 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( | 358 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
| 360 isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags); | 359 isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags); |
| 361 | 360 |
| 362 Node* code_target = HeapConstant(callable.code()); | 361 Node* code_target = HeapConstant(callable.code()); |
| 363 | 362 |
| 364 Node** args = zone()->NewArray<Node*>(5); | 363 Node** args = zone()->NewArray<Node*>(5); |
| 365 args[0] = arg_count; | 364 args[0] = arg_count; |
| 366 args[1] = original_constructor; | 365 args[1] = new_target; |
| 367 args[2] = constructor; | 366 args[2] = constructor; |
| 368 args[3] = first_arg; | 367 args[3] = first_arg; |
| 369 args[4] = GetContext(); | 368 args[4] = GetContext(); |
| 370 | 369 |
| 371 return CallN(descriptor, code_target, args); | 370 return CallN(descriptor, code_target, args); |
| 372 } | 371 } |
| 373 | 372 |
| 374 | 373 |
| 375 Node* InterpreterAssembler::CallN(CallDescriptor* descriptor, Node* code_target, | 374 Node* InterpreterAssembler::CallN(CallDescriptor* descriptor, Node* code_target, |
| 376 Node** args) { | 375 Node** args) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 return raw_assembler_->schedule(); | 645 return raw_assembler_->schedule(); |
| 647 } | 646 } |
| 648 | 647 |
| 649 | 648 |
| 650 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 649 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
| 651 | 650 |
| 652 | 651 |
| 653 } // namespace compiler | 652 } // namespace compiler |
| 654 } // namespace internal | 653 } // namespace internal |
| 655 } // namespace v8 | 654 } // namespace v8 |
| OLD | NEW |