| 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 | 1211 |
| 1212 | 1212 |
| 1213 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, | 1213 void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
| 1214 bool pretenure) { | 1214 bool pretenure) { |
| 1215 // Use the fast case closure allocation code that allocates in new | 1215 // Use the fast case closure allocation code that allocates in new |
| 1216 // space for nested functions that don't need literals cloning. If | 1216 // space for nested functions that don't need literals cloning. If |
| 1217 // we're running with the --always-opt or the --prepare-always-opt | 1217 // we're running with the --always-opt or the --prepare-always-opt |
| 1218 // flag, we need to use the runtime function so that the new function | 1218 // flag, we need to use the runtime function so that the new function |
| 1219 // we are creating here gets a chance to have its code optimized and | 1219 // we are creating here gets a chance to have its code optimized and |
| 1220 // doesn't just get a copy of the existing unoptimized code. | 1220 // doesn't just get a copy of the existing unoptimized code. |
| 1221 if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && | 1221 if (!FLAG_always_opt && |
| 1222 scope()->is_function_scope()) { | 1222 !FLAG_prepare_always_opt && |
| 1223 !pretenure && |
| 1224 scope()->is_function_scope() && |
| 1225 info->num_literals() == 0) { |
| 1223 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); | 1226 FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
| 1224 __ li(a2, Operand(info)); | 1227 __ li(a2, Operand(info)); |
| 1225 __ CallStub(&stub); | 1228 __ CallStub(&stub); |
| 1226 } else { | 1229 } else { |
| 1227 __ Push(info); | 1230 __ Push(info); |
| 1228 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured | 1231 __ CallRuntime(pretenure ? Runtime::kNewClosure_Tenured |
| 1229 : Runtime::kNewClosure); | 1232 : Runtime::kNewClosure); |
| 1230 } | 1233 } |
| 1231 context()->Plug(v0); | 1234 context()->Plug(v0); |
| 1232 } | 1235 } |
| (...skipping 3575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4808 reinterpret_cast<uint64_t>( | 4811 reinterpret_cast<uint64_t>( |
| 4809 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4812 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4810 return OSR_AFTER_STACK_CHECK; | 4813 return OSR_AFTER_STACK_CHECK; |
| 4811 } | 4814 } |
| 4812 | 4815 |
| 4813 | 4816 |
| 4814 } // namespace internal | 4817 } // namespace internal |
| 4815 } // namespace v8 | 4818 } // namespace v8 |
| 4816 | 4819 |
| 4817 #endif // V8_TARGET_ARCH_MIPS64 | 4820 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |