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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 __ jmp(done); | 1173 __ jmp(done); |
1174 } | 1174 } |
1175 } | 1175 } |
1176 } | 1176 } |
1177 | 1177 |
1178 | 1178 |
1179 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | 1179 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
1180 TypeofMode typeof_mode) { | 1180 TypeofMode typeof_mode) { |
1181 #ifdef DEBUG | 1181 #ifdef DEBUG |
1182 Variable* var = proxy->var(); | 1182 Variable* var = proxy->var(); |
1183 DCHECK(var->IsUnallocatedOrGlobalSlot() || | 1183 DCHECK(var->IsUnallocated() || |
1184 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | 1184 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
1185 #endif | 1185 #endif |
1186 __ mov(LoadGlobalDescriptor::SlotRegister(), | 1186 __ mov(LoadGlobalDescriptor::SlotRegister(), |
1187 Immediate(SmiFromSlot(proxy->VariableFeedbackSlot()))); | 1187 Immediate(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
1188 CallLoadGlobalIC(typeof_mode); | 1188 CallLoadGlobalIC(typeof_mode); |
1189 } | 1189 } |
1190 | 1190 |
1191 | 1191 |
1192 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1192 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1193 TypeofMode typeof_mode) { | 1193 TypeofMode typeof_mode) { |
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2915 CallRuntimeWithOperands(is_strict(language_mode()) | 2915 CallRuntimeWithOperands(is_strict(language_mode()) |
2916 ? Runtime::kDeleteProperty_Strict | 2916 ? Runtime::kDeleteProperty_Strict |
2917 : Runtime::kDeleteProperty_Sloppy); | 2917 : Runtime::kDeleteProperty_Sloppy); |
2918 context()->Plug(eax); | 2918 context()->Plug(eax); |
2919 } else if (proxy != NULL) { | 2919 } else if (proxy != NULL) { |
2920 Variable* var = proxy->var(); | 2920 Variable* var = proxy->var(); |
2921 // Delete of an unqualified identifier is disallowed in strict mode but | 2921 // Delete of an unqualified identifier is disallowed in strict mode but |
2922 // "delete this" is allowed. | 2922 // "delete this" is allowed. |
2923 bool is_this = var->is_this(); | 2923 bool is_this = var->is_this(); |
2924 DCHECK(is_sloppy(language_mode()) || is_this); | 2924 DCHECK(is_sloppy(language_mode()) || is_this); |
2925 if (var->IsUnallocatedOrGlobalSlot()) { | 2925 if (var->IsUnallocated()) { |
2926 __ mov(eax, NativeContextOperand()); | 2926 __ mov(eax, NativeContextOperand()); |
2927 __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); | 2927 __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); |
2928 __ push(Immediate(var->name())); | 2928 __ push(Immediate(var->name())); |
2929 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); | 2929 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); |
2930 context()->Plug(eax); | 2930 context()->Plug(eax); |
2931 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 2931 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
2932 // Result of deleting non-global variables is false. 'this' is | 2932 // Result of deleting non-global variables is false. 'this' is |
2933 // not really a variable, though we implement it as one. The | 2933 // not really a variable, though we implement it as one. The |
2934 // subexpression does not have side effects. | 2934 // subexpression does not have side effects. |
2935 context()->Plug(is_this); | 2935 context()->Plug(is_this); |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3637 isolate->builtins()->OnStackReplacement()->entry(), | 3637 isolate->builtins()->OnStackReplacement()->entry(), |
3638 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3638 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3639 return ON_STACK_REPLACEMENT; | 3639 return ON_STACK_REPLACEMENT; |
3640 } | 3640 } |
3641 | 3641 |
3642 | 3642 |
3643 } // namespace internal | 3643 } // namespace internal |
3644 } // namespace v8 | 3644 } // namespace v8 |
3645 | 3645 |
3646 #endif // V8_TARGET_ARCH_X87 | 3646 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |