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

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

Issue 2177273002: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comment and shift Created 4 years, 4 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
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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698