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