| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 // Visit the declarations and body unless there is an illegal | 357 // Visit the declarations and body unless there is an illegal |
| 358 // redeclaration. | 358 // redeclaration. |
| 359 if (scope()->HasIllegalRedeclaration()) { | 359 if (scope()->HasIllegalRedeclaration()) { |
| 360 Comment cmnt(masm_, "[ Declarations"); | 360 Comment cmnt(masm_, "[ Declarations"); |
| 361 scope()->VisitIllegalRedeclaration(this); | 361 scope()->VisitIllegalRedeclaration(this); |
| 362 | 362 |
| 363 } else { | 363 } else { |
| 364 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); | 364 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
| 365 { Comment cmnt(masm_, "[ Declarations"); | 365 { Comment cmnt(masm_, "[ Declarations"); |
| 366 // For named function expressions, declare the function name as a | |
| 367 // constant. | |
| 368 if (scope()->is_function_scope() && scope()->function() != NULL) { | |
| 369 VariableDeclaration* function = scope()->function(); | |
| 370 DCHECK(function->proxy()->var()->mode() == CONST || | |
| 371 function->proxy()->var()->mode() == CONST_LEGACY); | |
| 372 DCHECK(!function->proxy()->var()->IsUnallocatedOrGlobalSlot()); | |
| 373 VisitVariableDeclaration(function); | |
| 374 } | |
| 375 VisitDeclarations(scope()->declarations()); | 366 VisitDeclarations(scope()->declarations()); |
| 376 } | 367 } |
| 377 | 368 |
| 378 { Comment cmnt(masm_, "[ Stack check"); | 369 { Comment cmnt(masm_, "[ Stack check"); |
| 379 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 370 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
| 380 Label ok; | 371 Label ok; |
| 381 __ LoadRoot(at, Heap::kStackLimitRootIndex); | 372 __ LoadRoot(at, Heap::kStackLimitRootIndex); |
| 382 __ Branch(&ok, hs, sp, Operand(at)); | 373 __ Branch(&ok, hs, sp, Operand(at)); |
| 383 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); | 374 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); |
| 384 PredictableCodeSizeScope predictable(masm_, | 375 PredictableCodeSizeScope predictable(masm_, |
| (...skipping 5160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5545 reinterpret_cast<uint32_t>( | 5536 reinterpret_cast<uint32_t>( |
| 5546 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5537 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5547 return OSR_AFTER_STACK_CHECK; | 5538 return OSR_AFTER_STACK_CHECK; |
| 5548 } | 5539 } |
| 5549 | 5540 |
| 5550 | 5541 |
| 5551 } // namespace internal | 5542 } // namespace internal |
| 5552 } // namespace v8 | 5543 } // namespace v8 |
| 5553 | 5544 |
| 5554 #endif // V8_TARGET_ARCH_MIPS | 5545 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |