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

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

Issue 1329293003: [runtime] Sanitize %NewClosure runtime entries. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Ports Created 5 years, 3 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/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.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 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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 // doesn't just get a copy of the existing unoptimized code. 1193 // doesn't just get a copy of the existing unoptimized code.
1194 if (!FLAG_always_opt && 1194 if (!FLAG_always_opt &&
1195 !FLAG_prepare_always_opt && 1195 !FLAG_prepare_always_opt &&
1196 !pretenure && 1196 !pretenure &&
1197 scope()->is_function_scope() && 1197 scope()->is_function_scope() &&
1198 info->num_literals() == 0) { 1198 info->num_literals() == 0) {
1199 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); 1199 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind());
1200 __ Move(rbx, info); 1200 __ Move(rbx, info);
1201 __ CallStub(&stub); 1201 __ CallStub(&stub);
1202 } else { 1202 } else {
1203 __ Push(rsi);
1204 __ Push(info); 1203 __ Push(info);
1205 __ Push(pretenure 1204 __ CallRuntime(
1206 ? isolate()->factory()->true_value() 1205 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1207 : isolate()->factory()->false_value());
1208 __ CallRuntime(Runtime::kNewClosure, 3);
1209 } 1206 }
1210 context()->Plug(rax); 1207 context()->Plug(rax);
1211 } 1208 }
1212 1209
1213 1210
1214 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, 1211 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer,
1215 int offset, 1212 int offset,
1216 FeedbackVectorICSlot slot) { 1213 FeedbackVectorICSlot slot) {
1217 if (NeedsHomeObject(initializer)) { 1214 if (NeedsHomeObject(initializer)) {
1218 __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0)); 1215 __ movp(StoreDescriptor::ReceiverRegister(), Operand(rsp, 0));
(...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after
5251 Assembler::target_address_at(call_target_address, 5248 Assembler::target_address_at(call_target_address,
5252 unoptimized_code)); 5249 unoptimized_code));
5253 return OSR_AFTER_STACK_CHECK; 5250 return OSR_AFTER_STACK_CHECK;
5254 } 5251 }
5255 5252
5256 5253
5257 } // namespace internal 5254 } // namespace internal
5258 } // namespace v8 5255 } // namespace v8
5259 5256
5260 #endif // V8_TARGET_ARCH_X64 5257 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698