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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 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 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 1158
1159 1159
1160 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, 1160 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
1161 bool pretenure) { 1161 bool pretenure) {
1162 // Use the fast case closure allocation code that allocates in new 1162 // Use the fast case closure allocation code that allocates in new
1163 // space for nested functions that don't need literals cloning. If 1163 // space for nested functions that don't need literals cloning. If
1164 // we're running with the --always-opt or the --prepare-always-opt 1164 // we're running with the --always-opt or the --prepare-always-opt
1165 // flag, we need to use the runtime function so that the new function 1165 // flag, we need to use the runtime function so that the new function
1166 // we are creating here gets a chance to have its code optimized and 1166 // we are creating here gets a chance to have its code optimized and
1167 // doesn't just get a copy of the existing unoptimized code. 1167 // doesn't just get a copy of the existing unoptimized code.
1168 if (!FLAG_always_opt && 1168 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure &&
1169 !FLAG_prepare_always_opt && 1169 scope()->is_function_scope()) {
1170 !pretenure &&
1171 scope()->is_function_scope() &&
1172 info->num_literals() == 0) {
1173 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); 1170 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind());
1174 __ Move(rbx, info); 1171 __ Move(rbx, info);
1175 __ CallStub(&stub); 1172 __ CallStub(&stub);
1176 } else { 1173 } else {
1177 __ Push(info); 1174 __ Push(info);
1178 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured 1175 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured
1179 : Runtime::kNewClosure); 1176 : Runtime::kNewClosure);
1180 } 1177 }
1181 context()->Plug(rax); 1178 context()->Plug(rax);
1182 } 1179 }
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
4751 Assembler::target_address_at(call_target_address, 4748 Assembler::target_address_at(call_target_address,
4752 unoptimized_code)); 4749 unoptimized_code));
4753 return OSR_AFTER_STACK_CHECK; 4750 return OSR_AFTER_STACK_CHECK;
4754 } 4751 }
4755 4752
4756 4753
4757 } // namespace internal 4754 } // namespace internal
4758 } // namespace v8 4755 } // namespace v8
4759 4756
4760 #endif // V8_TARGET_ARCH_X64 4757 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698