| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 5256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5267 __ sw(value, MemOperand(fp, frame_offset)); | 5267 __ sw(value, MemOperand(fp, frame_offset)); |
| 5268 } | 5268 } |
| 5269 | 5269 |
| 5270 | 5270 |
| 5271 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 5271 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
| 5272 __ lw(dst, ContextOperand(cp, context_index)); | 5272 __ lw(dst, ContextOperand(cp, context_index)); |
| 5273 } | 5273 } |
| 5274 | 5274 |
| 5275 | 5275 |
| 5276 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { | 5276 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { |
| 5277 Scope* declaration_scope = scope()->DeclarationScope(); | 5277 Scope* closure_scope = scope()->ClosureScope(); |
| 5278 if (declaration_scope->is_script_scope() || | 5278 if (closure_scope->is_script_scope() || |
| 5279 declaration_scope->is_module_scope()) { | 5279 closure_scope->is_module_scope()) { |
| 5280 // Contexts nested in the native context have a canonical empty function | 5280 // Contexts nested in the native context have a canonical empty function |
| 5281 // as their closure, not the anonymous closure containing the global | 5281 // as their closure, not the anonymous closure containing the global |
| 5282 // code. Pass a smi sentinel and let the runtime look up the empty | 5282 // code. Pass a smi sentinel and let the runtime look up the empty |
| 5283 // function. | 5283 // function. |
| 5284 __ li(at, Operand(Smi::FromInt(0))); | 5284 __ li(at, Operand(Smi::FromInt(0))); |
| 5285 } else if (declaration_scope->is_eval_scope()) { | 5285 } else if (closure_scope->is_eval_scope()) { |
| 5286 // Contexts created by a call to eval have the same closure as the | 5286 // Contexts created by a call to eval have the same closure as the |
| 5287 // context calling eval, not the anonymous closure containing the eval | 5287 // context calling eval, not the anonymous closure containing the eval |
| 5288 // code. Fetch it from the context. | 5288 // code. Fetch it from the context. |
| 5289 __ lw(at, ContextOperand(cp, Context::CLOSURE_INDEX)); | 5289 __ lw(at, ContextOperand(cp, Context::CLOSURE_INDEX)); |
| 5290 } else { | 5290 } else { |
| 5291 DCHECK(declaration_scope->is_function_scope()); | 5291 DCHECK(closure_scope->is_function_scope()); |
| 5292 __ lw(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 5292 __ lw(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 5293 } | 5293 } |
| 5294 __ push(at); | 5294 __ push(at); |
| 5295 } | 5295 } |
| 5296 | 5296 |
| 5297 | 5297 |
| 5298 // ---------------------------------------------------------------------------- | 5298 // ---------------------------------------------------------------------------- |
| 5299 // Non-local control flow support. | 5299 // Non-local control flow support. |
| 5300 | 5300 |
| 5301 void FullCodeGenerator::EnterFinallyBlock() { | 5301 void FullCodeGenerator::EnterFinallyBlock() { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5436 reinterpret_cast<uint32_t>( | 5436 reinterpret_cast<uint32_t>( |
| 5437 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5437 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5438 return OSR_AFTER_STACK_CHECK; | 5438 return OSR_AFTER_STACK_CHECK; |
| 5439 } | 5439 } |
| 5440 | 5440 |
| 5441 | 5441 |
| 5442 } // namespace internal | 5442 } // namespace internal |
| 5443 } // namespace v8 | 5443 } // namespace v8 |
| 5444 | 5444 |
| 5445 #endif // V8_TARGET_ARCH_MIPS | 5445 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |