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 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2947 VisitForStackValue(property->obj()); | 2947 VisitForStackValue(property->obj()); |
2948 VisitForStackValue(property->key()); | 2948 VisitForStackValue(property->key()); |
2949 CallRuntimeWithOperands(is_strict(language_mode()) | 2949 CallRuntimeWithOperands(is_strict(language_mode()) |
2950 ? Runtime::kDeleteProperty_Strict | 2950 ? Runtime::kDeleteProperty_Strict |
2951 : Runtime::kDeleteProperty_Sloppy); | 2951 : Runtime::kDeleteProperty_Sloppy); |
2952 context()->Plug(eax); | 2952 context()->Plug(eax); |
2953 } else if (proxy != NULL) { | 2953 } else if (proxy != NULL) { |
2954 Variable* var = proxy->var(); | 2954 Variable* var = proxy->var(); |
2955 // Delete of an unqualified identifier is disallowed in strict mode but | 2955 // Delete of an unqualified identifier is disallowed in strict mode but |
2956 // "delete this" is allowed. | 2956 // "delete this" is allowed. |
2957 bool is_this = var->HasThisName(isolate()); | 2957 bool is_this = var->is_this(); |
2958 DCHECK(is_sloppy(language_mode()) || is_this); | 2958 DCHECK(is_sloppy(language_mode()) || is_this); |
2959 if (var->IsUnallocatedOrGlobalSlot()) { | 2959 if (var->IsUnallocatedOrGlobalSlot()) { |
2960 __ mov(eax, NativeContextOperand()); | 2960 __ mov(eax, NativeContextOperand()); |
2961 __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); | 2961 __ push(ContextOperand(eax, Context::EXTENSION_INDEX)); |
2962 __ push(Immediate(var->name())); | 2962 __ push(Immediate(var->name())); |
2963 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); | 2963 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); |
2964 context()->Plug(eax); | 2964 context()->Plug(eax); |
2965 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 2965 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
2966 // Result of deleting non-global variables is false. 'this' is | 2966 // Result of deleting non-global variables is false. 'this' is |
2967 // not really a variable, though we implement it as one. The | 2967 // not really a variable, though we implement it as one. The |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3671 isolate->builtins()->OnStackReplacement()->entry(), | 3671 isolate->builtins()->OnStackReplacement()->entry(), |
3672 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3672 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3673 return ON_STACK_REPLACEMENT; | 3673 return ON_STACK_REPLACEMENT; |
3674 } | 3674 } |
3675 | 3675 |
3676 | 3676 |
3677 } // namespace internal | 3677 } // namespace internal |
3678 } // namespace v8 | 3678 } // namespace v8 |
3679 | 3679 |
3680 #endif // V8_TARGET_ARCH_IA32 | 3680 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |