Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1350)

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 2113673002: [stubs]: Convert FastNewContext stub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename based on feedback Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698