| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 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 5245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5256 __ StoreP(value, MemOperand(fp, frame_offset), r0); | 5256 __ StoreP(value, MemOperand(fp, frame_offset), r0); |
| 5257 } | 5257 } |
| 5258 | 5258 |
| 5259 | 5259 |
| 5260 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 5260 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
| 5261 __ LoadP(dst, ContextOperand(cp, context_index), r0); | 5261 __ LoadP(dst, ContextOperand(cp, context_index), r0); |
| 5262 } | 5262 } |
| 5263 | 5263 |
| 5264 | 5264 |
| 5265 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { | 5265 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
| 5266 Scope* declaration_scope = scope()->DeclarationScope(); | 5266 Scope* closure_scope = scope()->ClosureScope(); |
| 5267 if (declaration_scope->is_script_scope() || | 5267 if (closure_scope->is_script_scope() || |
| 5268 declaration_scope->is_module_scope()) { | 5268 closure_scope->is_module_scope()) { |
| 5269 // Contexts nested in the native context have a canonical empty function | 5269 // Contexts nested in the native context have a canonical empty function |
| 5270 // as their closure, not the anonymous closure containing the global | 5270 // as their closure, not the anonymous closure containing the global |
| 5271 // code. Pass a smi sentinel and let the runtime look up the empty | 5271 // code. Pass a smi sentinel and let the runtime look up the empty |
| 5272 // function. | 5272 // function. |
| 5273 __ LoadSmiLiteral(ip, Smi::FromInt(0)); | 5273 __ LoadSmiLiteral(ip, Smi::FromInt(0)); |
| 5274 } else if (declaration_scope->is_eval_scope()) { | 5274 } else if (closure_scope->is_eval_scope()) { |
| 5275 // Contexts created by a call to eval have the same closure as the | 5275 // Contexts created by a call to eval have the same closure as the |
| 5276 // context calling eval, not the anonymous closure containing the eval | 5276 // context calling eval, not the anonymous closure containing the eval |
| 5277 // code. Fetch it from the context. | 5277 // code. Fetch it from the context. |
| 5278 __ LoadP(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); | 5278 __ LoadP(ip, ContextOperand(cp, Context::CLOSURE_INDEX)); |
| 5279 } else { | 5279 } else { |
| 5280 DCHECK(declaration_scope->is_function_scope()); | 5280 DCHECK(closure_scope->is_function_scope()); |
| 5281 __ LoadP(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 5281 __ LoadP(ip, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 5282 } | 5282 } |
| 5283 __ push(ip); | 5283 __ push(ip); |
| 5284 } | 5284 } |
| 5285 | 5285 |
| 5286 | 5286 |
| 5287 // ---------------------------------------------------------------------------- | 5287 // ---------------------------------------------------------------------------- |
| 5288 // Non-local control flow support. | 5288 // Non-local control flow support. |
| 5289 | 5289 |
| 5290 void FullCodeGenerator::EnterFinallyBlock() { | 5290 void FullCodeGenerator::EnterFinallyBlock() { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5417 return ON_STACK_REPLACEMENT; | 5417 return ON_STACK_REPLACEMENT; |
| 5418 } | 5418 } |
| 5419 | 5419 |
| 5420 DCHECK(interrupt_address == | 5420 DCHECK(interrupt_address == |
| 5421 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5421 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5422 return OSR_AFTER_STACK_CHECK; | 5422 return OSR_AFTER_STACK_CHECK; |
| 5423 } | 5423 } |
| 5424 } // namespace internal | 5424 } // namespace internal |
| 5425 } // namespace v8 | 5425 } // namespace v8 |
| 5426 #endif // V8_TARGET_ARCH_PPC | 5426 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |