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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 } else { | 456 } else { |
457 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); | 457 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); |
458 } | 458 } |
459 } | 459 } |
460 | 460 |
461 | 461 |
462 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { | 462 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { |
463 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); | 463 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); |
464 } | 464 } |
465 | 465 |
| 466 void JSGenericLowering::LowerJSCreateKeyValueArray(Node* node) { |
| 467 ReplaceWithRuntimeCall(node, Runtime::kCreateKeyValueArray); |
| 468 } |
466 | 469 |
467 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { | 470 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { |
468 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); | 471 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); |
469 CallDescriptor::Flags flags = FrameStateFlagForCall(node); | 472 CallDescriptor::Flags flags = FrameStateFlagForCall(node); |
470 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(p.index())); | 473 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(p.index())); |
471 node->InsertInput(zone(), 2, jsgraph()->HeapConstant(p.constant())); | 474 node->InsertInput(zone(), 2, jsgraph()->HeapConstant(p.constant())); |
472 | 475 |
473 // Use the FastCloneShallowArrayStub only for shallow boilerplates up to the | 476 // Use the FastCloneShallowArrayStub only for shallow boilerplates up to the |
474 // initial length limit for arrays with "fast" elements kind. | 477 // initial length limit for arrays with "fast" elements kind. |
475 if ((p.flags() & ArrayLiteral::kShallowElements) != 0 && | 478 if ((p.flags() & ArrayLiteral::kShallowElements) != 0 && |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 } | 697 } |
695 | 698 |
696 | 699 |
697 MachineOperatorBuilder* JSGenericLowering::machine() const { | 700 MachineOperatorBuilder* JSGenericLowering::machine() const { |
698 return jsgraph()->machine(); | 701 return jsgraph()->machine(); |
699 } | 702 } |
700 | 703 |
701 } // namespace compiler | 704 } // namespace compiler |
702 } // namespace internal | 705 } // namespace internal |
703 } // namespace v8 | 706 } // namespace v8 |
OLD | NEW |