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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/compiler/linkage.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 // doesn't just get a copy of the existing unoptimized code. 1235 // doesn't just get a copy of the existing unoptimized code.
1236 if (!FLAG_always_opt && 1236 if (!FLAG_always_opt &&
1237 !FLAG_prepare_always_opt && 1237 !FLAG_prepare_always_opt &&
1238 !pretenure && 1238 !pretenure &&
1239 scope()->is_function_scope() && 1239 scope()->is_function_scope() &&
1240 info->num_literals() == 0) { 1240 info->num_literals() == 0) {
1241 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); 1241 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind());
1242 __ mov(r2, Operand(info)); 1242 __ mov(r2, Operand(info));
1243 __ CallStub(&stub); 1243 __ CallStub(&stub);
1244 } else { 1244 } else {
1245 __ mov(r0, Operand(info)); 1245 __ Push(info);
1246 __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex 1246 __ CallRuntime(
1247 : Heap::kFalseValueRootIndex); 1247 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1248 __ Push(cp, r0, r1);
1249 __ CallRuntime(Runtime::kNewClosure, 3);
1250 } 1248 }
1251 context()->Plug(r0); 1249 context()->Plug(r0);
1252 } 1250 }
1253 1251
1254 1252
1255 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, 1253 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer,
1256 int offset, 1254 int offset,
1257 FeedbackVectorICSlot slot) { 1255 FeedbackVectorICSlot slot) {
1258 if (NeedsHomeObject(initializer)) { 1256 if (NeedsHomeObject(initializer)) {
1259 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); 1257 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp));
(...skipping 4104 matching lines...) Expand 10 before | Expand all | Expand 10 after
5364 DCHECK(interrupt_address == 5362 DCHECK(interrupt_address ==
5365 isolate->builtins()->OsrAfterStackCheck()->entry()); 5363 isolate->builtins()->OsrAfterStackCheck()->entry());
5366 return OSR_AFTER_STACK_CHECK; 5364 return OSR_AFTER_STACK_CHECK;
5367 } 5365 }
5368 5366
5369 5367
5370 } // namespace internal 5368 } // namespace internal
5371 } // namespace v8 5369 } // namespace v8
5372 5370
5373 #endif // V8_TARGET_ARCH_ARM 5371 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698