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

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

Issue 2100883003: [Code Stubs] Convert FastNewClosureStub to a TurboFanCodeStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ia32 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/compiler/code-assembler.cc ('k') | src/compiler/raw-machine-assembler.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 472
473 473
474 void JSGenericLowering::LowerJSCreateClosure(Node* node) { 474 void JSGenericLowering::LowerJSCreateClosure(Node* node) {
475 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); 475 CreateClosureParameters const& p = CreateClosureParametersOf(node->op());
476 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 476 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
477 Handle<SharedFunctionInfo> const shared_info = p.shared_info(); 477 Handle<SharedFunctionInfo> const shared_info = p.shared_info();
478 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(shared_info)); 478 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(shared_info));
479 479
480 // Use the FastNewClosureStub only for functions allocated in new space. 480 // Use the FastNewClosureStub only for functions allocated in new space.
481 if (p.pretenure() == NOT_TENURED) { 481 if (p.pretenure() == NOT_TENURED) {
482 Callable callable = CodeFactory::FastNewClosure( 482 Callable callable = CodeFactory::FastNewClosure(isolate());
483 isolate(), shared_info->language_mode(), shared_info->kind());
484 ReplaceWithStubCall(node, callable, flags); 483 ReplaceWithStubCall(node, callable, flags);
485 } else { 484 } else {
486 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED) 485 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED)
487 ? Runtime::kNewClosure_Tenured 486 ? Runtime::kNewClosure_Tenured
488 : Runtime::kNewClosure); 487 : Runtime::kNewClosure);
489 } 488 }
490 } 489 }
491 490
492 491
493 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 492 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 738 }
740 739
741 740
742 MachineOperatorBuilder* JSGenericLowering::machine() const { 741 MachineOperatorBuilder* JSGenericLowering::machine() const {
743 return jsgraph()->machine(); 742 return jsgraph()->machine();
744 } 743 }
745 744
746 } // namespace compiler 745 } // namespace compiler
747 } // namespace internal 746 } // namespace internal
748 } // namespace v8 747 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698