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

Side by Side Diff: src/crankshaft/hydrogen.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/contexts.h ('k') | src/full-codegen/full-codegen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 5656 matching lines...) Expand 10 before | Expand all | Expand 10 after
5667 DCHECK(current_block()->HasPredecessor()); 5667 DCHECK(current_block()->HasPredecessor());
5668 Handle<SharedFunctionInfo> shared_info = Compiler::GetSharedFunctionInfo( 5668 Handle<SharedFunctionInfo> shared_info = Compiler::GetSharedFunctionInfo(
5669 expr, current_info()->script(), top_info()); 5669 expr, current_info()->script(), top_info());
5670 // We also have a stack overflow if the recursive compilation did. 5670 // We also have a stack overflow if the recursive compilation did.
5671 if (HasStackOverflow()) return; 5671 if (HasStackOverflow()) return;
5672 // Use the fast case closure allocation code that allocates in new 5672 // Use the fast case closure allocation code that allocates in new
5673 // space for nested functions that don't need pretenuring. 5673 // space for nested functions that don't need pretenuring.
5674 HConstant* shared_info_value = Add<HConstant>(shared_info); 5674 HConstant* shared_info_value = Add<HConstant>(shared_info);
5675 HInstruction* instr; 5675 HInstruction* instr;
5676 if (!expr->pretenure()) { 5676 if (!expr->pretenure()) {
5677 FastNewClosureStub stub(isolate(), shared_info->language_mode(), 5677 FastNewClosureStub stub(isolate());
5678 shared_info->kind());
5679 FastNewClosureDescriptor descriptor(isolate()); 5678 FastNewClosureDescriptor descriptor(isolate());
5680 HValue* values[] = {context(), shared_info_value}; 5679 HValue* values[] = {context(), shared_info_value};
5681 HConstant* stub_value = Add<HConstant>(stub.GetCode()); 5680 HConstant* stub_value = Add<HConstant>(stub.GetCode());
5682 instr = New<HCallWithDescriptor>(stub_value, 0, descriptor, 5681 instr = New<HCallWithDescriptor>(stub_value, 0, descriptor,
5683 ArrayVector(values)); 5682 ArrayVector(values));
5684 } else { 5683 } else {
5685 Add<HPushArguments>(shared_info_value); 5684 Add<HPushArguments>(shared_info_value);
5686 Runtime::FunctionId function_id = 5685 Runtime::FunctionId function_id =
5687 expr->pretenure() ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure; 5686 expr->pretenure() ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure;
5688 instr = New<HCallRuntime>(Runtime::FunctionForId(function_id), 1); 5687 instr = New<HCallRuntime>(Runtime::FunctionForId(function_id), 1);
(...skipping 8002 matching lines...) Expand 10 before | Expand all | Expand 10 after
13691 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13690 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13692 } 13691 }
13693 13692
13694 #ifdef DEBUG 13693 #ifdef DEBUG
13695 graph_->Verify(false); // No full verify. 13694 graph_->Verify(false); // No full verify.
13696 #endif 13695 #endif
13697 } 13696 }
13698 13697
13699 } // namespace internal 13698 } // namespace internal
13700 } // namespace v8 13699 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698