OLD | NEW |
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/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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 __ bind(loop_statement.break_label()); | 1165 __ bind(loop_statement.break_label()); |
1166 DropOperands(5); | 1166 DropOperands(5); |
1167 | 1167 |
1168 // Exit and decrement the loop depth. | 1168 // Exit and decrement the loop depth. |
1169 PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); | 1169 PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); |
1170 __ bind(&exit); | 1170 __ bind(&exit); |
1171 decrement_loop_depth(); | 1171 decrement_loop_depth(); |
1172 } | 1172 } |
1173 | 1173 |
1174 | 1174 |
1175 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | |
1176 bool pretenure) { | |
1177 // Use the fast case closure allocation code that allocates in new | |
1178 // space for nested functions that don't need literals cloning. If | |
1179 // we're running with the --always-opt or the --prepare-always-opt | |
1180 // flag, we need to use the runtime function so that the new function | |
1181 // we are creating here gets a chance to have its code optimized and | |
1182 // doesn't just get a copy of the existing unoptimized code. | |
1183 if (!FLAG_always_opt && | |
1184 !FLAG_prepare_always_opt && | |
1185 !pretenure && | |
1186 scope()->is_function_scope() && | |
1187 info->num_literals() == 0) { | |
1188 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | |
1189 __ mov(r2, Operand(info)); | |
1190 __ CallStub(&stub); | |
1191 } else { | |
1192 __ Push(info); | |
1193 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | |
1194 : Runtime::kNewClosure); | |
1195 } | |
1196 context()->Plug(r0); | |
1197 } | |
1198 | |
1199 | |
1200 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, | 1175 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, |
1201 FeedbackVectorSlot slot) { | 1176 FeedbackVectorSlot slot) { |
1202 DCHECK(NeedsHomeObject(initializer)); | 1177 DCHECK(NeedsHomeObject(initializer)); |
1203 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1178 __ ldr(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1204 __ mov(StoreDescriptor::NameRegister(), | 1179 __ mov(StoreDescriptor::NameRegister(), |
1205 Operand(isolate()->factory()->home_object_symbol())); | 1180 Operand(isolate()->factory()->home_object_symbol())); |
1206 __ ldr(StoreDescriptor::ValueRegister(), | 1181 __ ldr(StoreDescriptor::ValueRegister(), |
1207 MemOperand(sp, offset * kPointerSize)); | 1182 MemOperand(sp, offset * kPointerSize)); |
1208 EmitLoadStoreICSlot(slot); | 1183 EmitLoadStoreICSlot(slot); |
1209 CallStoreIC(); | 1184 CallStoreIC(); |
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4295 DCHECK(interrupt_address == | 4270 DCHECK(interrupt_address == |
4296 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4271 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4297 return OSR_AFTER_STACK_CHECK; | 4272 return OSR_AFTER_STACK_CHECK; |
4298 } | 4273 } |
4299 | 4274 |
4300 | 4275 |
4301 } // namespace internal | 4276 } // namespace internal |
4302 } // namespace v8 | 4277 } // namespace v8 |
4303 | 4278 |
4304 #endif // V8_TARGET_ARCH_ARM | 4279 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |