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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 __ bind(loop_statement.break_label()); | 1162 __ bind(loop_statement.break_label()); |
1163 DropOperands(5); | 1163 DropOperands(5); |
1164 | 1164 |
1165 // Exit and decrement the loop depth. | 1165 // Exit and decrement the loop depth. |
1166 PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); | 1166 PrepareForBailoutForId(stmt->ExitId(), NO_REGISTERS); |
1167 __ bind(&exit); | 1167 __ bind(&exit); |
1168 decrement_loop_depth(); | 1168 decrement_loop_depth(); |
1169 } | 1169 } |
1170 | 1170 |
1171 | 1171 |
1172 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | |
1173 bool pretenure) { | |
1174 // Use the fast case closure allocation code that allocates in new | |
1175 // space for nested functions that don't need literals cloning. If | |
1176 // we're running with the --always-opt or the --prepare-always-opt | |
1177 // flag, we need to use the runtime function so that the new function | |
1178 // we are creating here gets a chance to have its code optimized and | |
1179 // doesn't just get a copy of the existing unoptimized code. | |
1180 if (!FLAG_always_opt && | |
1181 !FLAG_prepare_always_opt && | |
1182 !pretenure && | |
1183 scope()->is_function_scope() && | |
1184 info->num_literals() == 0) { | |
1185 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | |
1186 __ li(a2, Operand(info)); | |
1187 __ CallStub(&stub); | |
1188 } else { | |
1189 __ Push(info); | |
1190 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | |
1191 : Runtime::kNewClosure); | |
1192 } | |
1193 context()->Plug(v0); | |
1194 } | |
1195 | |
1196 | |
1197 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, | 1172 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, |
1198 FeedbackVectorSlot slot) { | 1173 FeedbackVectorSlot slot) { |
1199 DCHECK(NeedsHomeObject(initializer)); | 1174 DCHECK(NeedsHomeObject(initializer)); |
1200 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); | 1175 __ ld(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); |
1201 __ li(StoreDescriptor::NameRegister(), | 1176 __ li(StoreDescriptor::NameRegister(), |
1202 Operand(isolate()->factory()->home_object_symbol())); | 1177 Operand(isolate()->factory()->home_object_symbol())); |
1203 __ ld(StoreDescriptor::ValueRegister(), | 1178 __ ld(StoreDescriptor::ValueRegister(), |
1204 MemOperand(sp, offset * kPointerSize)); | 1179 MemOperand(sp, offset * kPointerSize)); |
1205 EmitLoadStoreICSlot(slot); | 1180 EmitLoadStoreICSlot(slot); |
1206 CallStoreIC(); | 1181 CallStoreIC(); |
(...skipping 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4256 reinterpret_cast<uint64_t>( | 4231 reinterpret_cast<uint64_t>( |
4257 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4232 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4258 return OSR_AFTER_STACK_CHECK; | 4233 return OSR_AFTER_STACK_CHECK; |
4259 } | 4234 } |
4260 | 4235 |
4261 | 4236 |
4262 } // namespace internal | 4237 } // namespace internal |
4263 } // namespace v8 | 4238 } // namespace v8 |
4264 | 4239 |
4265 #endif // V8_TARGET_ARCH_MIPS64 | 4240 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |