| 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 4806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4817 __ ld(dst, ContextOperand(cp, context_index)); | 4817 __ ld(dst, ContextOperand(cp, context_index)); |
| 4818 } | 4818 } |
| 4819 | 4819 |
| 4820 | 4820 |
| 4821 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { | 4821 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
| 4822 Scope* closure_scope = scope()->ClosureScope(); | 4822 Scope* closure_scope = scope()->ClosureScope(); |
| 4823 if (closure_scope->is_script_scope() || | 4823 if (closure_scope->is_script_scope() || |
| 4824 closure_scope->is_module_scope()) { | 4824 closure_scope->is_module_scope()) { |
| 4825 // Contexts nested in the native context have a canonical empty function | 4825 // Contexts nested in the native context have a canonical empty function |
| 4826 // as their closure, not the anonymous closure containing the global | 4826 // as their closure, not the anonymous closure containing the global |
| 4827 // code. Pass a smi sentinel and let the runtime look up the empty | 4827 // code. |
| 4828 // function. | 4828 __ ld(at, GlobalObjectOperand()); |
| 4829 __ li(at, Operand(Smi::FromInt(0))); | 4829 __ ld(at, FieldMemOperand(at, JSGlobalObject::kNativeContextOffset)); |
| 4830 __ ld(at, ContextOperand(at, Context::CLOSURE_INDEX)); |
| 4830 } else if (closure_scope->is_eval_scope()) { | 4831 } else if (closure_scope->is_eval_scope()) { |
| 4831 // Contexts created by a call to eval have the same closure as the | 4832 // Contexts created by a call to eval have the same closure as the |
| 4832 // context calling eval, not the anonymous closure containing the eval | 4833 // context calling eval, not the anonymous closure containing the eval |
| 4833 // code. Fetch it from the context. | 4834 // code. Fetch it from the context. |
| 4834 __ ld(at, ContextOperand(cp, Context::CLOSURE_INDEX)); | 4835 __ ld(at, ContextOperand(cp, Context::CLOSURE_INDEX)); |
| 4835 } else { | 4836 } else { |
| 4836 DCHECK(closure_scope->is_function_scope()); | 4837 DCHECK(closure_scope->is_function_scope()); |
| 4837 __ ld(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 4838 __ ld(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 4838 } | 4839 } |
| 4839 __ push(at); | 4840 __ push(at); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4983 reinterpret_cast<uint64_t>( | 4984 reinterpret_cast<uint64_t>( |
| 4984 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4985 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4985 return OSR_AFTER_STACK_CHECK; | 4986 return OSR_AFTER_STACK_CHECK; |
| 4986 } | 4987 } |
| 4987 | 4988 |
| 4988 | 4989 |
| 4989 } // namespace internal | 4990 } // namespace internal |
| 4990 } // namespace v8 | 4991 } // namespace v8 |
| 4991 | 4992 |
| 4992 #endif // V8_TARGET_ARCH_MIPS64 | 4993 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |