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

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

Issue 2445703002: 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 ? Runtime::kNewClosure_Tenured 442 ? Runtime::kNewClosure_Tenured
443 : Runtime::kNewClosure); 443 : Runtime::kNewClosure);
444 } 444 }
445 } 445 }
446 446
447 447
448 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 448 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
449 int const slot_count = OpParameter<int>(node->op()); 449 int const slot_count = OpParameter<int>(node->op());
450 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 450 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
451 451
452 Callable callable = CodeFactory::FastNewFunctionContext(isolate()); 452 if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
453 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); 453 Callable callable = CodeFactory::FastNewFunctionContext(isolate());
454 ReplaceWithStubCall(node, callable, flags); 454 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
455 ReplaceWithStubCall(node, callable, flags);
456 } else {
457 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext);
458 }
455 } 459 }
456 460
457 461
458 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { 462 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
459 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); 463 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);
460 } 464 }
461 465
462 466
463 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { 467 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
464 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); 468 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op());
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 694 }
691 695
692 696
693 MachineOperatorBuilder* JSGenericLowering::machine() const { 697 MachineOperatorBuilder* JSGenericLowering::machine() const {
694 return jsgraph()->machine(); 698 return jsgraph()->machine();
695 } 699 }
696 700
697 } // namespace compiler 701 } // namespace compiler
698 } // namespace internal 702 } // namespace internal
699 } // namespace v8 703 } // 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