| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 Node* literal_flags = jsgraph()->SmiConstant(p.flags()); | 502 Node* literal_flags = jsgraph()->SmiConstant(p.flags()); |
| 503 Node* pattern = jsgraph()->HeapConstant(p.constant()); | 503 Node* pattern = jsgraph()->HeapConstant(p.constant()); |
| 504 node->InsertInput(graph()->zone(), 1, literal_index); | 504 node->InsertInput(graph()->zone(), 1, literal_index); |
| 505 node->InsertInput(graph()->zone(), 2, pattern); | 505 node->InsertInput(graph()->zone(), 2, pattern); |
| 506 node->InsertInput(graph()->zone(), 3, literal_flags); | 506 node->InsertInput(graph()->zone(), 3, literal_flags); |
| 507 ReplaceWithStubCall(node, callable, flags); | 507 ReplaceWithStubCall(node, callable, flags); |
| 508 } | 508 } |
| 509 | 509 |
| 510 | 510 |
| 511 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { | 511 void JSGenericLowering::LowerJSCreateCatchContext(Node* node) { |
| 512 Handle<String> name = OpParameter<Handle<String>>(node); | 512 const CreateCatchContextParameters& parameters = |
| 513 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(name)); | 513 CreateCatchContextParametersOf(node->op()); |
| 514 node->InsertInput(zone(), 0, |
| 515 jsgraph()->HeapConstant(parameters.catch_name())); |
| 516 node->InsertInput(zone(), 2, |
| 517 jsgraph()->HeapConstant(parameters.scope_info())); |
| 514 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); | 518 ReplaceWithRuntimeCall(node, Runtime::kPushCatchContext); |
| 515 } | 519 } |
| 516 | 520 |
| 517 | 521 |
| 518 void JSGenericLowering::LowerJSCreateBlockContext(Node* node) { | 522 void JSGenericLowering::LowerJSCreateBlockContext(Node* node) { |
| 519 Handle<ScopeInfo> scope_info = OpParameter<Handle<ScopeInfo>>(node); | 523 Handle<ScopeInfo> scope_info = OpParameter<Handle<ScopeInfo>>(node); |
| 520 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(scope_info)); | 524 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(scope_info)); |
| 521 ReplaceWithRuntimeCall(node, Runtime::kPushBlockContext); | 525 ReplaceWithRuntimeCall(node, Runtime::kPushBlockContext); |
| 522 } | 526 } |
| 523 | 527 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 } | 677 } |
| 674 | 678 |
| 675 | 679 |
| 676 MachineOperatorBuilder* JSGenericLowering::machine() const { | 680 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 677 return jsgraph()->machine(); | 681 return jsgraph()->machine(); |
| 678 } | 682 } |
| 679 | 683 |
| 680 } // namespace compiler | 684 } // namespace compiler |
| 681 } // namespace internal | 685 } // namespace internal |
| 682 } // namespace v8 | 686 } // namespace v8 |
| OLD | NEW |