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

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

Issue 2457783004: Merged: Don't call FastNewFunctionContextStub if context is bigger than kMaxRegularHeapObjectSize. (Closed)
Patch Set: Created 4 years, 1 month 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.h ('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/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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 ? Runtime::kNewClosure_Tenured 434 ? Runtime::kNewClosure_Tenured
435 : Runtime::kNewClosure); 435 : Runtime::kNewClosure);
436 } 436 }
437 } 437 }
438 438
439 439
440 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 440 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
441 int const slot_count = OpParameter<int>(node->op()); 441 int const slot_count = OpParameter<int>(node->op());
442 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 442 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
443 443
444 Callable callable = CodeFactory::FastNewFunctionContext(isolate()); 444 if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
445 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); 445 Callable callable = CodeFactory::FastNewFunctionContext(isolate());
446 ReplaceWithStubCall(node, callable, flags); 446 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
447 ReplaceWithStubCall(node, callable, flags);
448 } else {
449 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext);
450 }
447 } 451 }
448 452
449 453
450 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { 454 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
451 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); 455 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);
452 } 456 }
453 457
454 458
455 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { 459 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
456 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); 460 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op());
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 } 686 }
683 687
684 688
685 MachineOperatorBuilder* JSGenericLowering::machine() const { 689 MachineOperatorBuilder* JSGenericLowering::machine() const {
686 return jsgraph()->machine(); 690 return jsgraph()->machine();
687 } 691 }
688 692
689 } // namespace compiler 693 } // namespace compiler
690 } // namespace internal 694 } // namespace internal
691 } // namespace v8 695 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698