| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 graph()->start())); | 407 graph()->start())); |
| 408 } | 408 } |
| 409 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); | 409 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); |
| 410 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( | 410 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( |
| 411 static_cast<int>(access.index())))); | 411 static_cast<int>(access.index())))); |
| 412 node->set_op( | 412 node->set_op( |
| 413 machine()->Store(StoreRepresentation(kMachAnyTagged, kFullWriteBarrier))); | 413 machine()->Store(StoreRepresentation(kMachAnyTagged, kFullWriteBarrier))); |
| 414 } | 414 } |
| 415 | 415 |
| 416 | 416 |
| 417 void JSGenericLowering::LowerJSCreateClosure(Node* node) { |
| 418 CreateClosureParameters p = CreateClosureParametersOf(node->op()); |
| 419 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.shared_info())); |
| 420 node->InsertInput(zone(), 2, jsgraph()->BooleanConstant(p.pretenure())); |
| 421 ReplaceWithRuntimeCall(node, Runtime::kNewClosure); |
| 422 } |
| 423 |
| 424 |
| 417 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { | 425 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { |
| 418 Unique<String> name = OpParameter<Unique<String>>(node); | 426 Unique<String> name = OpParameter<Unique<String>>(node); |
| 419 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name)); | 427 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name)); |
| 420 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); | 428 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); |
| 421 } | 429 } |
| 422 | 430 |
| 423 | 431 |
| 424 void JSGenericLowering::LowerJSCallConstruct(Node* node) { | 432 void JSGenericLowering::LowerJSCallConstruct(Node* node) { |
| 425 int arity = OpParameter<int>(node); | 433 int arity = OpParameter<int>(node); |
| 426 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); | 434 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 556 } |
| 549 | 557 |
| 550 | 558 |
| 551 MachineOperatorBuilder* JSGenericLowering::machine() const { | 559 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 552 return jsgraph()->machine(); | 560 return jsgraph()->machine(); |
| 553 } | 561 } |
| 554 | 562 |
| 555 } // namespace compiler | 563 } // namespace compiler |
| 556 } // namespace internal | 564 } // namespace internal |
| 557 } // namespace v8 | 565 } // namespace v8 |
| OLD | NEW |