| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 } | 436 } |
| 437 | 437 |
| 438 | 438 |
| 439 void JSGenericLowering::LowerJSHasProperty(Node* node) { | 439 void JSGenericLowering::LowerJSHasProperty(Node* node) { |
| 440 ReplaceWithBuiltinCall(node, Builtins::IN, 2); | 440 ReplaceWithBuiltinCall(node, Builtins::IN, 2); |
| 441 } | 441 } |
| 442 | 442 |
| 443 | 443 |
| 444 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 444 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
| 445 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 445 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 446 InstanceofStub::Flags stub_flags = static_cast<InstanceofStub::Flags>( | 446 Callable callable = CodeFactory::InstanceOf(isolate()); |
| 447 InstanceofStub::kReturnTrueFalseObject | | |
| 448 InstanceofStub::kArgsInRegisters); | |
| 449 Callable callable = CodeFactory::Instanceof(isolate(), stub_flags); | |
| 450 ReplaceWithStubCall(node, callable, flags); | 447 ReplaceWithStubCall(node, callable, flags); |
| 451 } | 448 } |
| 452 | 449 |
| 453 | 450 |
| 454 void JSGenericLowering::LowerJSLoadContext(Node* node) { | 451 void JSGenericLowering::LowerJSLoadContext(Node* node) { |
| 455 const ContextAccess& access = ContextAccessOf(node->op()); | 452 const ContextAccess& access = ContextAccessOf(node->op()); |
| 456 for (size_t i = 0; i < access.depth(); ++i) { | 453 for (size_t i = 0; i < access.depth(); ++i) { |
| 457 node->ReplaceInput( | 454 node->ReplaceInput( |
| 458 0, graph()->NewNode(machine()->Load(kMachAnyTagged), | 455 0, graph()->NewNode(machine()->Load(kMachAnyTagged), |
| 459 NodeProperties::GetValueInput(node, 0), | 456 NodeProperties::GetValueInput(node, 0), |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 } | 846 } |
| 850 | 847 |
| 851 | 848 |
| 852 MachineOperatorBuilder* JSGenericLowering::machine() const { | 849 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 853 return jsgraph()->machine(); | 850 return jsgraph()->machine(); |
| 854 } | 851 } |
| 855 | 852 |
| 856 } // namespace compiler | 853 } // namespace compiler |
| 857 } // namespace internal | 854 } // namespace internal |
| 858 } // namespace v8 | 855 } // namespace v8 |
| OLD | NEW |