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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 338 |
339 // Visit the declarations and body unless there is an illegal | 339 // Visit the declarations and body unless there is an illegal |
340 // redeclaration. | 340 // redeclaration. |
341 if (scope()->HasIllegalRedeclaration()) { | 341 if (scope()->HasIllegalRedeclaration()) { |
342 Comment cmnt(masm_, "[ Declarations"); | 342 Comment cmnt(masm_, "[ Declarations"); |
343 scope()->VisitIllegalRedeclaration(this); | 343 scope()->VisitIllegalRedeclaration(this); |
344 | 344 |
345 } else { | 345 } else { |
346 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); | 346 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); |
347 { Comment cmnt(masm_, "[ Declarations"); | 347 { Comment cmnt(masm_, "[ Declarations"); |
348 // For named function expressions, declare the function name as a | |
349 // constant. | |
350 if (scope()->is_function_scope() && scope()->function() != NULL) { | |
351 VariableDeclaration* function = scope()->function(); | |
352 DCHECK(function->proxy()->var()->mode() == CONST || | |
353 function->proxy()->var()->mode() == CONST_LEGACY); | |
354 DCHECK(!function->proxy()->var()->IsUnallocatedOrGlobalSlot()); | |
355 VisitVariableDeclaration(function); | |
356 } | |
357 VisitDeclarations(scope()->declarations()); | 348 VisitDeclarations(scope()->declarations()); |
358 } | 349 } |
359 | 350 |
360 { Comment cmnt(masm_, "[ Stack check"); | 351 { Comment cmnt(masm_, "[ Stack check"); |
361 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); | 352 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); |
362 Label ok; | 353 Label ok; |
363 __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 354 __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
364 __ cmp(sp, Operand(ip)); | 355 __ cmp(sp, Operand(ip)); |
365 __ b(hs, &ok); | 356 __ b(hs, &ok); |
366 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); | 357 Handle<Code> stack_check = isolate()->builtins()->StackCheck(); |
(...skipping 5221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5588 DCHECK(interrupt_address == | 5579 DCHECK(interrupt_address == |
5589 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5580 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5590 return OSR_AFTER_STACK_CHECK; | 5581 return OSR_AFTER_STACK_CHECK; |
5591 } | 5582 } |
5592 | 5583 |
5593 | 5584 |
5594 } // namespace internal | 5585 } // namespace internal |
5595 } // namespace v8 | 5586 } // namespace v8 |
5596 | 5587 |
5597 #endif // V8_TARGET_ARCH_ARM | 5588 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |