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

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

Issue 2604833004: [builtins] FastNewFunctionContextStub becomes a builtin (Closed)
Patch Set: That was unnecessary, reverted :) Created 3 years, 11 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/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/builtins/builtins-constructor.h"
8 #include "src/code-factory.h" 9 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
10 #include "src/compiler/common-operator.h" 11 #include "src/compiler/common-operator.h"
11 #include "src/compiler/js-graph.h" 12 #include "src/compiler/js-graph.h"
12 #include "src/compiler/machine-operator.h" 13 #include "src/compiler/machine-operator.h"
13 #include "src/compiler/node-matchers.h" 14 #include "src/compiler/node-matchers.h"
14 #include "src/compiler/node-properties.h" 15 #include "src/compiler/node-properties.h"
15 #include "src/compiler/operator-properties.h" 16 #include "src/compiler/operator-properties.h"
16 17
17 namespace v8 { 18 namespace v8 {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 358 }
358 359
359 360
360 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 361 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
361 const CreateFunctionContextParameters& parameters = 362 const CreateFunctionContextParameters& parameters =
362 CreateFunctionContextParametersOf(node->op()); 363 CreateFunctionContextParametersOf(node->op());
363 int slot_count = parameters.slot_count(); 364 int slot_count = parameters.slot_count();
364 ScopeType scope_type = parameters.scope_type(); 365 ScopeType scope_type = parameters.scope_type();
365 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 366 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
366 367
367 if (slot_count <= FastNewFunctionContextStub::MaximumSlots()) { 368 if (slot_count <=
369 ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) {
368 Callable callable = 370 Callable callable =
369 CodeFactory::FastNewFunctionContext(isolate(), scope_type); 371 CodeFactory::FastNewFunctionContext(isolate(), scope_type);
370 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); 372 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
371 ReplaceWithStubCall(node, callable, flags); 373 ReplaceWithStubCall(node, callable, flags);
372 } else { 374 } else {
373 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(scope_type)); 375 node->InsertInput(zone(), 1, jsgraph()->SmiConstant(scope_type));
374 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext); 376 ReplaceWithRuntimeCall(node, Runtime::kNewFunctionContext);
375 } 377 }
376 } 378 }
377 379
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 630 }
629 631
630 632
631 MachineOperatorBuilder* JSGenericLowering::machine() const { 633 MachineOperatorBuilder* JSGenericLowering::machine() const {
632 return jsgraph()->machine(); 634 return jsgraph()->machine();
633 } 635 }
634 636
635 } // namespace compiler 637 } // namespace compiler
636 } // namespace internal 638 } // namespace internal
637 } // namespace v8 639 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698