| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
| (...skipping 4777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4788 __ ldr(dst, ContextOperand(cp, context_index)); | 4788 __ ldr(dst, ContextOperand(cp, context_index)); |
| 4789 } | 4789 } |
| 4790 | 4790 |
| 4791 | 4791 |
| 4792 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { | 4792 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
| 4793 Scope* closure_scope = scope()->ClosureScope(); | 4793 Scope* closure_scope = scope()->ClosureScope(); |
| 4794 if (closure_scope->is_script_scope() || | 4794 if (closure_scope->is_script_scope() || |
| 4795 closure_scope->is_module_scope()) { | 4795 closure_scope->is_module_scope()) { |
| 4796 // Contexts nested in the native context have a canonical empty function | 4796 // Contexts nested in the native context have a canonical empty function |
| 4797 // as their closure, not the anonymous closure containing the global | 4797 // as their closure, not the anonymous closure containing the global |
| 4798 // code. Pass a smi sentinel and let the runtime look up the empty | 4798 // code. |
| 4799 // function. | 4799 __ ldr(ip, GlobalObjectOperand()); |
| 4800 __ mov(ip, Operand(Smi::FromInt(0))); | 4800 __ ldr(ip, FieldMemOperand(ip, JSGlobalObject::kNativeContextOffset)); |
| 4801 __ ldr(ip, ContextOperand(ip, Context::CLOSURE_INDEX)); |
| 4801 } else if (closure_scope->is_eval_scope()) { | 4802 } else if (closure_scope->is_eval_scope()) { |
| 4802 // Contexts created by a call to eval have the same closure as the | 4803 // Contexts created by a call to eval have the same closure as the |
| 4803 // context calling eval, not the anonymous closure containing the eval | 4804 // context calling eval, not the anonymous closure containing the eval |
| 4804 // code. Fetch it from the context. | 4805 // code. Fetch it from the context. |
| 4805 __ ldr(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); | 4806 __ ldr(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); |
| 4806 } else { | 4807 } else { |
| 4807 DCHECK(closure_scope->is_function_scope()); | 4808 DCHECK(closure_scope->is_function_scope()); |
| 4808 __ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 4809 __ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 4809 } | 4810 } |
| 4810 __ push(ip); | 4811 __ push(ip); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5011 DCHECK(interrupt_address == | 5012 DCHECK(interrupt_address == |
| 5012 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5013 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5013 return OSR_AFTER_STACK_CHECK; | 5014 return OSR_AFTER_STACK_CHECK; |
| 5014 } | 5015 } |
| 5015 | 5016 |
| 5016 | 5017 |
| 5017 } // namespace internal | 5018 } // namespace internal |
| 5018 } // namespace v8 | 5019 } // namespace v8 |
| 5019 | 5020 |
| 5020 #endif // V8_TARGET_ARCH_ARM | 5021 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |