Chromium Code Reviews| 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 | 423 |
| 424 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { | 424 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { |
| 425 int const slot_count = OpParameter<int>(node->op()); | 425 int const slot_count = OpParameter<int>(node->op()); |
| 426 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); | 426 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 427 | 427 |
| 428 // Use the FastNewFunctionContextStub only for function contexts up maximum | 428 // Use the FastNewFunctionContextStub only for function contexts up maximum |
| 429 // size. | 429 // size. |
| 430 if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) { | 430 if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) { |
|
klaasb
2016/07/29 09:51:36
What about this and similar lines elsewhere? I wou
| |
| 431 Callable callable = CodeFactory::FastNewContext(isolate(), slot_count); | 431 Callable callable = CodeFactory::FastNewContext(isolate()); |
| 432 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); | |
|
Benedikt Meurer
2016/07/29 03:29:16
I'm not sure this is correct according to the inte
klaasb
2016/07/29 09:51:36
Done.
| |
| 432 ReplaceWithStubCall(node, callable, flags); | 433 ReplaceWithStubCall(node, callable, flags); |
| 433 } else { | 434 } else { |
| 434 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); | 435 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); |
| 435 } | 436 } |
| 436 } | 437 } |
| 437 | 438 |
| 438 | 439 |
| 439 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { | 440 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { |
| 440 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); | 441 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); |
| 441 } | 442 } |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 671 } | 672 } |
| 672 | 673 |
| 673 | 674 |
| 674 MachineOperatorBuilder* JSGenericLowering::machine() const { | 675 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 675 return jsgraph()->machine(); | 676 return jsgraph()->machine(); |
| 676 } | 677 } |
| 677 | 678 |
| 678 } // namespace compiler | 679 } // namespace compiler |
| 679 } // namespace internal | 680 } // namespace internal |
| 680 } // namespace v8 | 681 } // namespace v8 |
| OLD | NEW |