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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 5238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5249 __ str(value, MemOperand(fp, frame_offset)); | 5249 __ str(value, MemOperand(fp, frame_offset)); |
5250 } | 5250 } |
5251 | 5251 |
5252 | 5252 |
5253 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 5253 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
5254 __ ldr(dst, ContextOperand(cp, context_index)); | 5254 __ ldr(dst, ContextOperand(cp, context_index)); |
5255 } | 5255 } |
5256 | 5256 |
5257 | 5257 |
5258 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { | 5258 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
5259 Scope* declaration_scope = scope()->DeclarationScope(); | 5259 Scope* closure_scope = scope()->ClosureScope(); |
5260 if (declaration_scope->is_script_scope() || | 5260 if (closure_scope->is_script_scope() || |
5261 declaration_scope->is_module_scope()) { | 5261 closure_scope->is_module_scope()) { |
5262 // Contexts nested in the native context have a canonical empty function | 5262 // Contexts nested in the native context have a canonical empty function |
5263 // as their closure, not the anonymous closure containing the global | 5263 // as their closure, not the anonymous closure containing the global |
5264 // code. Pass a smi sentinel and let the runtime look up the empty | 5264 // code. Pass a smi sentinel and let the runtime look up the empty |
5265 // function. | 5265 // function. |
5266 __ mov(ip, Operand(Smi::FromInt(0))); | 5266 __ mov(ip, Operand(Smi::FromInt(0))); |
5267 } else if (declaration_scope->is_eval_scope()) { | 5267 } else if (closure_scope->is_eval_scope()) { |
5268 // Contexts created by a call to eval have the same closure as the | 5268 // Contexts created by a call to eval have the same closure as the |
5269 // context calling eval, not the anonymous closure containing the eval | 5269 // context calling eval, not the anonymous closure containing the eval |
5270 // code. Fetch it from the context. | 5270 // code. Fetch it from the context. |
5271 __ ldr(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); | 5271 __ ldr(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); |
5272 } else { | 5272 } else { |
5273 DCHECK(declaration_scope->is_function_scope()); | 5273 DCHECK(closure_scope->is_function_scope()); |
5274 __ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 5274 __ ldr(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
5275 } | 5275 } |
5276 __ push(ip); | 5276 __ push(ip); |
5277 } | 5277 } |
5278 | 5278 |
5279 | 5279 |
5280 // ---------------------------------------------------------------------------- | 5280 // ---------------------------------------------------------------------------- |
5281 // Non-local control flow support. | 5281 // Non-local control flow support. |
5282 | 5282 |
5283 void FullCodeGenerator::EnterFinallyBlock() { | 5283 void FullCodeGenerator::EnterFinallyBlock() { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5477 DCHECK(interrupt_address == | 5477 DCHECK(interrupt_address == |
5478 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5478 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5479 return OSR_AFTER_STACK_CHECK; | 5479 return OSR_AFTER_STACK_CHECK; |
5480 } | 5480 } |
5481 | 5481 |
5482 | 5482 |
5483 } // namespace internal | 5483 } // namespace internal |
5484 } // namespace v8 | 5484 } // namespace v8 |
5485 | 5485 |
5486 #endif // V8_TARGET_ARCH_ARM | 5486 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |