| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 | 1202 |
| 1203 | 1203 |
| 1204 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | 1204 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
| 1205 bool pretenure) { | 1205 bool pretenure) { |
| 1206 // Use the fast case closure allocation code that allocates in new | 1206 // Use the fast case closure allocation code that allocates in new |
| 1207 // space for nested functions that don't need literals cloning. If | 1207 // space for nested functions that don't need literals cloning. If |
| 1208 // we're running with the --always-opt or the --prepare-always-opt | 1208 // we're running with the --always-opt or the --prepare-always-opt |
| 1209 // flag, we need to use the runtime function so that the new function | 1209 // flag, we need to use the runtime function so that the new function |
| 1210 // we are creating here gets a chance to have its code optimized and | 1210 // we are creating here gets a chance to have its code optimized and |
| 1211 // doesn't just get a copy of the existing unoptimized code. | 1211 // doesn't just get a copy of the existing unoptimized code. |
| 1212 if (!FLAG_always_opt && | 1212 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && |
| 1213 !FLAG_prepare_always_opt && | 1213 scope()->is_function_scope()) { |
| 1214 !pretenure && | |
| 1215 scope()->is_function_scope() && | |
| 1216 info->num_literals() == 0) { | |
| 1217 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1214 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
| 1218 __ li(a2, Operand(info)); | 1215 __ li(a2, Operand(info)); |
| 1219 __ CallStub(&stub); | 1216 __ CallStub(&stub); |
| 1220 } else { | 1217 } else { |
| 1221 __ Push(info); | 1218 __ Push(info); |
| 1222 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | 1219 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured |
| 1223 : Runtime::kNewClosure); | 1220 : Runtime::kNewClosure); |
| 1224 } | 1221 } |
| 1225 context()->Plug(v0); | 1222 context()->Plug(v0); |
| 1226 } | 1223 } |
| (...skipping 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4832 reinterpret_cast<uint32_t>( | 4829 reinterpret_cast<uint32_t>( |
| 4833 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4830 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4834 return OSR_AFTER_STACK_CHECK; | 4831 return OSR_AFTER_STACK_CHECK; |
| 4835 } | 4832 } |
| 4836 | 4833 |
| 4837 | 4834 |
| 4838 } // namespace internal | 4835 } // namespace internal |
| 4839 } // namespace v8 | 4836 } // namespace v8 |
| 4840 | 4837 |
| 4841 #endif // V8_TARGET_ARCH_MIPS | 4838 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |