| 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 } | 351 } |
| 352 // Visit the declarations and body unless there is an illegal | 352 // Visit the declarations and body unless there is an illegal |
| 353 // redeclaration. | 353 // redeclaration. |
| 354 if (scope()->HasIllegalRedeclaration()) { | 354 if (scope()->HasIllegalRedeclaration()) { |
| 355 Comment cmnt(masm_, "[ Declarations"); | 355 Comment cmnt(masm_, "[ Declarations"); |
| 356 scope()->VisitIllegalRedeclaration(this); | 356 scope()->VisitIllegalRedeclaration(this); |
| 357 | 357 |
| 358 } else { | 358 } else { |
| 359 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); | 359 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
| 360 { Comment cmnt(masm_, "[ Declarations"); | 360 { Comment cmnt(masm_, "[ Declarations"); |
| 361 // For named function expressions, declare the function name as a | |
| 362 // constant. | |
| 363 if (scope()->is_function_scope() && scope()->function() != NULL) { | |
| 364 VariableDeclaration* function = scope()->function(); | |
| 365 DCHECK(function->proxy()->var()->mode() == CONST || | |
| 366 function->proxy()->var()->mode() == CONST_LEGACY); | |
| 367 DCHECK(!function->proxy()->var()->IsUnallocatedOrGlobalSlot()); | |
| 368 VisitVariableDeclaration(function); | |
| 369 } | |
| 370 VisitDeclarations(scope()->declarations()); | 361 VisitDeclarations(scope()->declarations()); |
| 371 } | 362 } |
| 372 { Comment cmnt(masm_, "[ Stack check"); | 363 { Comment cmnt(masm_, "[ Stack check"); |
| 373 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 364 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
| 374 Label ok; | 365 Label ok; |
| 375 __ LoadRoot(at, Heap::kStackLimitRootIndex); | 366 __ LoadRoot(at, Heap::kStackLimitRootIndex); |
| 376 __ Branch(&ok, hs, sp, Operand(at)); | 367 __ Branch(&ok, hs, sp, Operand(at)); |
| 377 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); | 368 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); |
| 378 PredictableCodeSizeScope predictable(masm_, | 369 PredictableCodeSizeScope predictable(masm_, |
| 379 masm_->CallSize(stack_check, RelocInfo::CODE_TARGET)); | 370 masm_->CallSize(stack_check, RelocInfo::CODE_TARGET)); |
| (...skipping 5170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5550 reinterpret_cast<uint64_t>( | 5541 reinterpret_cast<uint64_t>( |
| 5551 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5542 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5552 return OSR_AFTER_STACK_CHECK; | 5543 return OSR_AFTER_STACK_CHECK; |
| 5553 } | 5544 } |
| 5554 | 5545 |
| 5555 | 5546 |
| 5556 } // namespace internal | 5547 } // namespace internal |
| 5557 } // namespace v8 | 5548 } // namespace v8 |
| 5558 | 5549 |
| 5559 #endif // V8_TARGET_ARCH_MIPS64 | 5550 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |