| 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/compiler/js-generic-lowering.h" | 5 #include "src/compiler/js-generic-lowering.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 : Runtime::kDeleteProperty_Sloppy); | 336 : Runtime::kDeleteProperty_Sloppy); |
| 337 } | 337 } |
| 338 | 338 |
| 339 | 339 |
| 340 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 340 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
| 341 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 341 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
| 342 Callable callable = CodeFactory::InstanceOf(isolate()); | 342 Callable callable = CodeFactory::InstanceOf(isolate()); |
| 343 ReplaceWithStubCall(node, callable, flags); | 343 ReplaceWithStubCall(node, callable, flags); |
| 344 } | 344 } |
| 345 | 345 |
| 346 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) { |
| 347 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
| 348 Callable callable = CodeFactory::OrdinaryHasInstance(isolate()); |
| 349 ReplaceWithStubCall(node, callable, flags); |
| 350 } |
| 346 | 351 |
| 347 void JSGenericLowering::LowerJSLoadContext(Node* node) { | 352 void JSGenericLowering::LowerJSLoadContext(Node* node) { |
| 348 const ContextAccess& access = ContextAccessOf(node->op()); | 353 const ContextAccess& access = ContextAccessOf(node->op()); |
| 349 for (size_t i = 0; i < access.depth(); ++i) { | 354 for (size_t i = 0; i < access.depth(); ++i) { |
| 350 node->ReplaceInput( | 355 node->ReplaceInput( |
| 351 0, graph()->NewNode(machine()->Load(MachineType::AnyTagged()), | 356 0, graph()->NewNode(machine()->Load(MachineType::AnyTagged()), |
| 352 NodeProperties::GetValueInput(node, 0), | 357 NodeProperties::GetValueInput(node, 0), |
| 353 jsgraph()->Int32Constant( | 358 jsgraph()->Int32Constant( |
| 354 Context::SlotOffset(Context::PREVIOUS_INDEX)), | 359 Context::SlotOffset(Context::PREVIOUS_INDEX)), |
| 355 NodeProperties::GetEffectInput(node), | 360 NodeProperties::GetEffectInput(node), |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 691 } |
| 687 | 692 |
| 688 | 693 |
| 689 MachineOperatorBuilder* JSGenericLowering::machine() const { | 694 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 690 return jsgraph()->machine(); | 695 return jsgraph()->machine(); |
| 691 } | 696 } |
| 692 | 697 |
| 693 } // namespace compiler | 698 } // namespace compiler |
| 694 } // namespace internal | 699 } // namespace internal |
| 695 } // namespace v8 | 700 } // namespace v8 |
| OLD | NEW |