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

Side by Side Diff: src/full-codegen/full-codegen.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/crankshaft/hydrogen.cc ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 } 1031 }
1032 1032
1033 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, 1033 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
1034 bool pretenure) { 1034 bool pretenure) {
1035 // If we're running with the --always-opt or the --prepare-always-opt 1035 // If we're running with the --always-opt or the --prepare-always-opt
1036 // flag, we need to use the runtime function so that the new function 1036 // flag, we need to use the runtime function so that the new function
1037 // we are creating here gets a chance to have its code optimized and 1037 // we are creating here gets a chance to have its code optimized and
1038 // doesn't just get a copy of the existing unoptimized code. 1038 // doesn't just get a copy of the existing unoptimized code.
1039 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && 1039 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure &&
1040 scope()->is_function_scope()) { 1040 scope()->is_function_scope()) {
1041 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); 1041 FastNewClosureStub stub(isolate());
1042 __ Move(stub.GetCallInterfaceDescriptor().GetRegisterParameter(0), info); 1042 __ Move(stub.GetCallInterfaceDescriptor().GetRegisterParameter(0), info);
1043 __ CallStub(&stub); 1043 __ CallStub(&stub);
1044 } else { 1044 } else {
1045 __ Push(info); 1045 __ Push(info);
1046 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured 1046 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
1047 : Runtime::kNewClosure); 1047 : Runtime::kNewClosure);
1048 } 1048 }
1049 context()->Plug(result_register()); 1049 context()->Plug(result_register());
1050 } 1050 }
1051 1051
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 return var->scope()->is_nonlinear() || 1986 return var->scope()->is_nonlinear() ||
1987 var->initializer_position() >= proxy->position(); 1987 var->initializer_position() >= proxy->position();
1988 } 1988 }
1989 1989
1990 1990
1991 #undef __ 1991 #undef __
1992 1992
1993 1993
1994 } // namespace internal 1994 } // namespace internal
1995 } // namespace v8 1995 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698