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