OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1187 } else { | 1187 } else { |
1188 __ b(done); | 1188 __ b(done); |
1189 } | 1189 } |
1190 } | 1190 } |
1191 } | 1191 } |
1192 | 1192 |
1193 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | 1193 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
1194 TypeofMode typeof_mode) { | 1194 TypeofMode typeof_mode) { |
1195 #ifdef DEBUG | 1195 #ifdef DEBUG |
1196 Variable* var = proxy->var(); | 1196 Variable* var = proxy->var(); |
1197 DCHECK(var->IsUnallocatedOrGlobalSlot() || | 1197 DCHECK(var->IsUnallocated() || |
1198 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | 1198 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
1199 #endif | 1199 #endif |
1200 __ mov(LoadGlobalDescriptor::SlotRegister(), | 1200 __ mov(LoadGlobalDescriptor::SlotRegister(), |
1201 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); | 1201 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
1202 CallLoadGlobalIC(typeof_mode); | 1202 CallLoadGlobalIC(typeof_mode); |
1203 } | 1203 } |
1204 | 1204 |
1205 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1205 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
1206 TypeofMode typeof_mode) { | 1206 TypeofMode typeof_mode) { |
1207 // Record position before possible IC call. | 1207 // Record position before possible IC call. |
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2955 CallRuntimeWithOperands(is_strict(language_mode()) | 2955 CallRuntimeWithOperands(is_strict(language_mode()) |
2956 ? Runtime::kDeleteProperty_Strict | 2956 ? Runtime::kDeleteProperty_Strict |
2957 : Runtime::kDeleteProperty_Sloppy); | 2957 : Runtime::kDeleteProperty_Sloppy); |
2958 context()->Plug(r2); | 2958 context()->Plug(r2); |
2959 } else if (proxy != NULL) { | 2959 } else if (proxy != NULL) { |
2960 Variable* var = proxy->var(); | 2960 Variable* var = proxy->var(); |
2961 // Delete of an unqualified identifier is disallowed in strict mode but | 2961 // Delete of an unqualified identifier is disallowed in strict mode but |
2962 // "delete this" is allowed. | 2962 // "delete this" is allowed. |
2963 bool is_this = var->is_this(); | 2963 bool is_this = var->is_this(); |
2964 DCHECK(is_sloppy(language_mode()) || is_this); | 2964 DCHECK(is_sloppy(language_mode()) || is_this); |
2965 if (var->IsUnallocatedOrGlobalSlot()) { | 2965 if (var->IsUnallocated()) { |
2966 __ LoadGlobalObject(r4); | 2966 __ LoadGlobalObject(r4); |
2967 __ mov(r3, Operand(var->name())); | 2967 __ mov(r3, Operand(var->name())); |
2968 __ Push(r4, r3); | 2968 __ Push(r4, r3); |
2969 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); | 2969 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); |
2970 context()->Plug(r2); | 2970 context()->Plug(r2); |
2971 } else if (var->IsStackAllocated() || var->IsContextSlot()) { | 2971 } else if (var->IsStackAllocated() || var->IsContextSlot()) { |
2972 // Result of deleting non-global, non-dynamic variables is false. | 2972 // Result of deleting non-global, non-dynamic variables is false. |
2973 // The subexpression does not have side effects. | 2973 // The subexpression does not have side effects. |
2974 context()->Plug(is_this); | 2974 context()->Plug(is_this); |
2975 } else { | 2975 } else { |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 DCHECK(kOSRBranchInstruction == br_instr); | 3650 DCHECK(kOSRBranchInstruction == br_instr); |
3651 | 3651 |
3652 DCHECK(interrupt_address == | 3652 DCHECK(interrupt_address == |
3653 isolate->builtins()->OnStackReplacement()->entry()); | 3653 isolate->builtins()->OnStackReplacement()->entry()); |
3654 return ON_STACK_REPLACEMENT; | 3654 return ON_STACK_REPLACEMENT; |
3655 } | 3655 } |
3656 | 3656 |
3657 } // namespace internal | 3657 } // namespace internal |
3658 } // namespace v8 | 3658 } // namespace v8 |
3659 #endif // V8_TARGET_ARCH_S390 | 3659 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |