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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 // existing unoptimized code. 1231 // existing unoptimized code.
1232 if (!FLAG_always_opt && 1232 if (!FLAG_always_opt &&
1233 !FLAG_prepare_always_opt && 1233 !FLAG_prepare_always_opt &&
1234 !pretenure && 1234 !pretenure &&
1235 scope()->is_function_scope() && 1235 scope()->is_function_scope() &&
1236 info->num_literals() == 0) { 1236 info->num_literals() == 0) {
1237 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); 1237 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind());
1238 __ Mov(x2, Operand(info)); 1238 __ Mov(x2, Operand(info));
1239 __ CallStub(&stub); 1239 __ CallStub(&stub);
1240 } else { 1240 } else {
1241 __ Mov(x11, Operand(info)); 1241 __ Push(info);
1242 __ LoadRoot(x10, pretenure ? Heap::kTrueValueRootIndex 1242 __ CallRuntime(
1243 : Heap::kFalseValueRootIndex); 1243 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1244 __ Push(cp, x11, x10);
1245 __ CallRuntime(Runtime::kNewClosure, 3);
1246 } 1244 }
1247 context()->Plug(x0); 1245 context()->Plug(x0);
1248 } 1246 }
1249 1247
1250 1248
1251 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, 1249 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer,
1252 int offset, 1250 int offset,
1253 FeedbackVectorICSlot slot) { 1251 FeedbackVectorICSlot slot) {
1254 if (NeedsHomeObject(initializer)) { 1252 if (NeedsHomeObject(initializer)) {
1255 __ Peek(StoreDescriptor::ReceiverRegister(), 0); 1253 __ Peek(StoreDescriptor::ReceiverRegister(), 0);
(...skipping 4109 matching lines...) Expand 10 before | Expand all | Expand 10 after
5365 } 5363 }
5366 5364
5367 return INTERRUPT; 5365 return INTERRUPT;
5368 } 5366 }
5369 5367
5370 5368
5371 } // namespace internal 5369 } // namespace internal
5372 } // namespace v8 5370 } // namespace v8
5373 5371
5374 #endif // V8_TARGET_ARCH_ARM64 5372 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698