| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 | 
| 6 | 6 | 
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" | 
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" | 
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" | 
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" | 
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 743         // No write barrier since the hole value is in old space. | 743         // No write barrier since the hole value is in old space. | 
| 744         PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 744         PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 
| 745       } | 745       } | 
| 746       break; | 746       break; | 
| 747 | 747 | 
| 748     case VariableLocation::LOOKUP: { | 748     case VariableLocation::LOOKUP: { | 
| 749       Comment cmnt(masm_, "[ VariableDeclaration"); | 749       Comment cmnt(masm_, "[ VariableDeclaration"); | 
| 750       __ push(Immediate(variable->name())); | 750       __ push(Immediate(variable->name())); | 
| 751       // VariableDeclaration nodes are always introduced in one of four modes. | 751       // VariableDeclaration nodes are always introduced in one of four modes. | 
| 752       DCHECK(IsDeclaredVariableMode(mode)); | 752       DCHECK(IsDeclaredVariableMode(mode)); | 
| 753       // Push initial value, if any. | 753       DCHECK(!hole_init); | 
| 754       // Note: For variables we must not push an initial value (such as | 754       __ push(Immediate(Smi::FromInt(0)));  // Indicates no initial value. | 
| 755       // 'undefined') because we may have a (legal) redeclaration and we |  | 
| 756       // must not destroy the current value. |  | 
| 757       if (hole_init) { |  | 
| 758         __ push(Immediate(isolate()->factory()->the_hole_value())); |  | 
| 759       } else { |  | 
| 760         __ push(Immediate(Smi::FromInt(0)));  // Indicates no initial value. |  | 
| 761       } |  | 
| 762       __ push( | 755       __ push( | 
| 763           Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes()))); | 756           Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes()))); | 
| 764       __ CallRuntime(Runtime::kDeclareLookupSlot); | 757       __ CallRuntime(Runtime::kDeclareLookupSlot); | 
| 765       PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 758       PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 
| 766       break; | 759       break; | 
| 767     } | 760     } | 
| 768   } | 761   } | 
| 769 } | 762 } | 
| 770 | 763 | 
| 771 | 764 | 
| (...skipping 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3718       isolate->builtins()->OnStackReplacement()->entry(), | 3711       isolate->builtins()->OnStackReplacement()->entry(), | 
| 3719       Assembler::target_address_at(call_target_address, unoptimized_code)); | 3712       Assembler::target_address_at(call_target_address, unoptimized_code)); | 
| 3720   return ON_STACK_REPLACEMENT; | 3713   return ON_STACK_REPLACEMENT; | 
| 3721 } | 3714 } | 
| 3722 | 3715 | 
| 3723 | 3716 | 
| 3724 }  // namespace internal | 3717 }  // namespace internal | 
| 3725 }  // namespace v8 | 3718 }  // namespace v8 | 
| 3726 | 3719 | 
| 3727 #endif  // V8_TARGET_ARCH_IA32 | 3720 #endif  // V8_TARGET_ARCH_IA32 | 
| OLD | NEW | 
|---|