Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Side by Side Diff: src/full-codegen/s390/full-codegen-s390.cc

Issue 2810363003: [builtins] Introduce DeleteProperty builtin (Closed)
Patch Set: fix CallableFor not to create handles Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2200 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { 2200 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
2201 switch (expr->op()) { 2201 switch (expr->op()) {
2202 case Token::DELETE: { 2202 case Token::DELETE: {
2203 Comment cmnt(masm_, "[ UnaryOperation (DELETE)"); 2203 Comment cmnt(masm_, "[ UnaryOperation (DELETE)");
2204 Property* property = expr->expression()->AsProperty(); 2204 Property* property = expr->expression()->AsProperty();
2205 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 2205 VariableProxy* proxy = expr->expression()->AsVariableProxy();
2206 2206
2207 if (property != NULL) { 2207 if (property != NULL) {
2208 VisitForStackValue(property->obj()); 2208 VisitForStackValue(property->obj());
2209 VisitForStackValue(property->key()); 2209 VisitForStackValue(property->key());
2210 CallRuntimeWithOperands(is_strict(language_mode()) 2210 PushOperand(Smi::FromInt(language_mode()));
2211 ? Runtime::kDeleteProperty_Strict 2211 CallRuntimeWithOperands(Runtime::kDeleteProperty);
2212 : Runtime::kDeleteProperty_Sloppy);
2213 context()->Plug(r2); 2212 context()->Plug(r2);
2214 } else if (proxy != NULL) { 2213 } else if (proxy != NULL) {
2215 Variable* var = proxy->var(); 2214 Variable* var = proxy->var();
2216 // Delete of an unqualified identifier is disallowed in strict mode but 2215 // Delete of an unqualified identifier is disallowed in strict mode but
2217 // "delete this" is allowed. 2216 // "delete this" is allowed.
2218 bool is_this = var->is_this(); 2217 bool is_this = var->is_this();
2219 DCHECK(is_sloppy(language_mode()) || is_this); 2218 DCHECK(is_sloppy(language_mode()) || is_this);
2220 if (var->IsUnallocated()) { 2219 if (var->IsUnallocated()) {
2221 __ LoadGlobalObject(r4); 2220 __ LoadGlobalObject(r4);
2222 __ mov(r3, Operand(var->name())); 2221 __ mov(r3, Operand(var->name()));
2223 __ Push(r4, r3); 2222 __ Push(r4, r3);
2224 __ CallRuntime(Runtime::kDeleteProperty_Sloppy); 2223 __ Push(Smi::FromInt(SLOPPY));
2224 __ CallRuntime(Runtime::kDeleteProperty);
2225 context()->Plug(r2); 2225 context()->Plug(r2);
2226 } else { 2226 } else {
2227 DCHECK(!var->IsLookupSlot()); 2227 DCHECK(!var->IsLookupSlot());
2228 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 2228 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
2229 // Result of deleting non-global, non-dynamic variables is false. 2229 // Result of deleting non-global, non-dynamic variables is false.
2230 // The subexpression does not have side effects. 2230 // The subexpression does not have side effects.
2231 context()->Plug(is_this); 2231 context()->Plug(is_this);
2232 } 2232 }
2233 } else { 2233 } else {
2234 // Result of deleting non-property, non-variable reference is true. 2234 // Result of deleting non-property, non-variable reference is true.
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2777 USE(kOSRBranchInstruction); 2777 USE(kOSRBranchInstruction);
2778 DCHECK(kOSRBranchInstruction == br_instr); 2778 DCHECK(kOSRBranchInstruction == br_instr);
2779 2779
2780 DCHECK(interrupt_address == 2780 DCHECK(interrupt_address ==
2781 isolate->builtins()->OnStackReplacement()->entry()); 2781 isolate->builtins()->OnStackReplacement()->entry());
2782 return ON_STACK_REPLACEMENT; 2782 return ON_STACK_REPLACEMENT;
2783 } 2783 }
2784 } // namespace internal 2784 } // namespace internal
2785 } // namespace v8 2785 } // namespace v8
2786 #endif // V8_TARGET_ARCH_S390 2786 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698