| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 ? Runtime::kNewClosure_Tenured | 472 ? Runtime::kNewClosure_Tenured |
| 473 : Runtime::kNewClosure); | 473 : Runtime::kNewClosure); |
| 474 } | 474 } |
| 475 } | 475 } |
| 476 | 476 |
| 477 | 477 |
| 478 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { | 478 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { |
| 479 int const slot_count = OpParameter<int>(node->op()); | 479 int const slot_count = OpParameter<int>(node->op()); |
| 480 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 480 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 481 | 481 |
| 482 // Use the FastNewContextStub only for function contexts up maximum size. | 482 // Use the FastNewFunctionContextStub only for function contexts up maximum |
| 483 if (slot_count <= FastNewContextStub::kMaximumSlots) { | 483 // size. |
| 484 if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) { |
| 484 Callable callable = CodeFactory::FastNewContext(isolate(), slot_count); | 485 Callable callable = CodeFactory::FastNewContext(isolate(), slot_count); |
| 485 ReplaceWithStubCall(node, callable, flags); | 486 ReplaceWithStubCall(node, callable, flags); |
| 486 } else { | 487 } else { |
| 487 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); | 488 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); |
| 488 } | 489 } |
| 489 } | 490 } |
| 490 | 491 |
| 491 | 492 |
| 492 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { | 493 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { |
| 493 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); | 494 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 } | 725 } |
| 725 | 726 |
| 726 | 727 |
| 727 MachineOperatorBuilder* JSGenericLowering::machine() const { | 728 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 728 return jsgraph()->machine(); | 729 return jsgraph()->machine(); |
| 729 } | 730 } |
| 730 | 731 |
| 731 } // namespace compiler | 732 } // namespace compiler |
| 732 } // namespace internal | 733 } // namespace internal |
| 733 } // namespace v8 | 734 } // namespace v8 |
| OLD | NEW |