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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2941 VisitForStackValue(property->obj()); | 2941 VisitForStackValue(property->obj()); |
2942 VisitForStackValue(property->key()); | 2942 VisitForStackValue(property->key()); |
2943 CallRuntimeWithOperands(is_strict(language_mode()) | 2943 CallRuntimeWithOperands(is_strict(language_mode()) |
2944 ? Runtime::kDeleteProperty_Strict | 2944 ? Runtime::kDeleteProperty_Strict |
2945 : Runtime::kDeleteProperty_Sloppy); | 2945 : Runtime::kDeleteProperty_Sloppy); |
2946 context()->Plug(rax); | 2946 context()->Plug(rax); |
2947 } else if (proxy != NULL) { | 2947 } else if (proxy != NULL) { |
2948 Variable* var = proxy->var(); | 2948 Variable* var = proxy->var(); |
2949 // Delete of an unqualified identifier is disallowed in strict mode but | 2949 // Delete of an unqualified identifier is disallowed in strict mode but |
2950 // "delete this" is allowed. | 2950 // "delete this" is allowed. |
2951 bool is_this = var->HasThisName(isolate()); | 2951 bool is_this = var->is_this(); |
2952 DCHECK(is_sloppy(language_mode()) || is_this); | 2952 DCHECK(is_sloppy(language_mode()) || is_this); |
2953 if (var->IsUnallocatedOrGlobalSlot()) { | 2953 if (var->IsUnallocatedOrGlobalSlot()) { |
2954 __ movp(rax, NativeContextOperand()); | 2954 __ movp(rax, NativeContextOperand()); |
2955 __ Push(ContextOperand(rax, Context::EXTENSION_INDEX)); | 2955 __ Push(ContextOperand(rax, Context::EXTENSION_INDEX)); |
2956 __ Push(var->name()); | 2956 __ Push(var->name()); |
2957 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); | 2957 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); |
2958 context()->Plug(rax); | 2958 context()->Plug(rax); |
2959 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 2959 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
2960 // Result of deleting non-global variables is false. 'this' is | 2960 // Result of deleting non-global variables is false. 'this' is |
2961 // not really a variable, though we implement it as one. The | 2961 // not really a variable, though we implement it as one. The |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3662 DCHECK_EQ( | 3662 DCHECK_EQ( |
3663 isolate->builtins()->OnStackReplacement()->entry(), | 3663 isolate->builtins()->OnStackReplacement()->entry(), |
3664 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3664 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3665 return ON_STACK_REPLACEMENT; | 3665 return ON_STACK_REPLACEMENT; |
3666 } | 3666 } |
3667 | 3667 |
3668 } // namespace internal | 3668 } // namespace internal |
3669 } // namespace v8 | 3669 } // namespace v8 |
3670 | 3670 |
3671 #endif // V8_TARGET_ARCH_X64 | 3671 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |