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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | src/hydrogen.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_X87 5 #if V8_TARGET_ARCH_X87
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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 // doesn't just get a copy of the existing unoptimized code. 1158 // doesn't just get a copy of the existing unoptimized code.
1159 if (!FLAG_always_opt && 1159 if (!FLAG_always_opt &&
1160 !FLAG_prepare_always_opt && 1160 !FLAG_prepare_always_opt &&
1161 !pretenure && 1161 !pretenure &&
1162 scope()->is_function_scope() && 1162 scope()->is_function_scope() &&
1163 info->num_literals() == 0) { 1163 info->num_literals() == 0) {
1164 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); 1164 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind());
1165 __ mov(ebx, Immediate(info)); 1165 __ mov(ebx, Immediate(info));
1166 __ CallStub(&stub); 1166 __ CallStub(&stub);
1167 } else { 1167 } else {
1168 __ push(esi);
1169 __ push(Immediate(info)); 1168 __ push(Immediate(info));
1170 __ push(Immediate(pretenure 1169 __ CallRuntime(
1171 ? isolate()->factory()->true_value() 1170 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1172 : isolate()->factory()->false_value()));
1173 __ CallRuntime(Runtime::kNewClosure, 3);
1174 } 1171 }
1175 context()->Plug(eax); 1172 context()->Plug(eax);
1176 } 1173 }
1177 1174
1178 1175
1179 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, 1176 void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer,
1180 int offset, 1177 int offset,
1181 FeedbackVectorICSlot slot) { 1178 FeedbackVectorICSlot slot) {
1182 if (NeedsHomeObject(initializer)) { 1179 if (NeedsHomeObject(initializer)) {
1183 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); 1180 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
(...skipping 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after
5214 Assembler::target_address_at(call_target_address, 5211 Assembler::target_address_at(call_target_address,
5215 unoptimized_code)); 5212 unoptimized_code));
5216 return OSR_AFTER_STACK_CHECK; 5213 return OSR_AFTER_STACK_CHECK;
5217 } 5214 }
5218 5215
5219 5216
5220 } // namespace internal 5217 } // namespace internal
5221 } // namespace v8 5218 } // namespace v8
5222 5219
5223 #endif // V8_TARGET_ARCH_X87 5220 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698