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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 491 |
492 void JSGenericLowering::LowerJSCreateClosure(Node* node) { | 492 void JSGenericLowering::LowerJSCreateClosure(Node* node) { |
493 CreateClosureParameters p = CreateClosureParametersOf(node->op()); | 493 CreateClosureParameters p = CreateClosureParametersOf(node->op()); |
494 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(p.shared_info())); | 494 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(p.shared_info())); |
495 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED) | 495 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED) |
496 ? Runtime::kNewClosure_Tenured | 496 ? Runtime::kNewClosure_Tenured |
497 : Runtime::kNewClosure); | 497 : Runtime::kNewClosure); |
498 } | 498 } |
499 | 499 |
500 | 500 |
| 501 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { |
| 502 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); |
| 503 } |
| 504 |
| 505 |
501 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { | 506 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { |
502 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); | 507 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); |
503 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(p.index())); | 508 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(p.index())); |
504 node->InsertInput(zone(), 2, jsgraph()->HeapConstant(p.constant())); | 509 node->InsertInput(zone(), 2, jsgraph()->HeapConstant(p.constant())); |
505 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.flags())); | 510 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.flags())); |
506 ReplaceWithRuntimeCall(node, Runtime::kCreateArrayLiteral); | 511 ReplaceWithRuntimeCall(node, Runtime::kCreateArrayLiteral); |
507 } | 512 } |
508 | 513 |
509 | 514 |
510 void JSGenericLowering::LowerJSCreateLiteralObject(Node* node) { | 515 void JSGenericLowering::LowerJSCreateLiteralObject(Node* node) { |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 } | 870 } |
866 | 871 |
867 | 872 |
868 MachineOperatorBuilder* JSGenericLowering::machine() const { | 873 MachineOperatorBuilder* JSGenericLowering::machine() const { |
869 return jsgraph()->machine(); | 874 return jsgraph()->machine(); |
870 } | 875 } |
871 | 876 |
872 } // namespace compiler | 877 } // namespace compiler |
873 } // namespace internal | 878 } // namespace internal |
874 } // namespace v8 | 879 } // namespace v8 |
OLD | NEW |