| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2985 var->AsSlot()->type() != Slot::LOOKUP) { | 2985 var->AsSlot()->type() != Slot::LOOKUP) { |
| 2986 // Result of deleting non-global, non-dynamic variables is false. | 2986 // Result of deleting non-global, non-dynamic variables is false. |
| 2987 // The subexpression does not have side effects. | 2987 // The subexpression does not have side effects. |
| 2988 context()->Plug(false); | 2988 context()->Plug(false); |
| 2989 } else { | 2989 } else { |
| 2990 // Property or variable reference. Call the delete builtin with | 2990 // Property or variable reference. Call the delete builtin with |
| 2991 // object and property name as arguments. | 2991 // object and property name as arguments. |
| 2992 if (prop != NULL) { | 2992 if (prop != NULL) { |
| 2993 VisitForStackValue(prop->obj()); | 2993 VisitForStackValue(prop->obj()); |
| 2994 VisitForStackValue(prop->key()); | 2994 VisitForStackValue(prop->key()); |
| 2995 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); |
| 2995 } else if (var->is_global()) { | 2996 } else if (var->is_global()) { |
| 2996 __ ldr(r1, GlobalObjectOperand()); | 2997 __ ldr(r1, GlobalObjectOperand()); |
| 2997 __ mov(r0, Operand(var->name())); | 2998 __ mov(r0, Operand(var->name())); |
| 2998 __ Push(r1, r0); | 2999 __ Push(r1, r0); |
| 3000 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); |
| 2999 } else { | 3001 } else { |
| 3000 // Non-global variable. Call the runtime to look up the context | 3002 // Non-global variable. Call the runtime to delete from the |
| 3001 // where the variable was introduced. | 3003 // context where the variable was introduced. |
| 3002 __ push(context_register()); | 3004 __ push(context_register()); |
| 3003 __ mov(r2, Operand(var->name())); | 3005 __ mov(r2, Operand(var->name())); |
| 3004 __ push(r2); | 3006 __ push(r2); |
| 3005 __ CallRuntime(Runtime::kLookupContext, 2); | 3007 __ CallRuntime(Runtime::kDeleteContextSlot, 2); |
| 3006 __ push(r0); | |
| 3007 __ mov(r2, Operand(var->name())); | |
| 3008 __ push(r2); | |
| 3009 } | 3008 } |
| 3010 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); | |
| 3011 context()->Plug(r0); | 3009 context()->Plug(r0); |
| 3012 } | 3010 } |
| 3013 break; | 3011 break; |
| 3014 } | 3012 } |
| 3015 | 3013 |
| 3016 case Token::VOID: { | 3014 case Token::VOID: { |
| 3017 Comment cmnt(masm_, "[ UnaryOperation (VOID)"); | 3015 Comment cmnt(masm_, "[ UnaryOperation (VOID)"); |
| 3018 VisitForEffect(expr->expression()); | 3016 VisitForEffect(expr->expression()); |
| 3019 context()->Plug(Heap::kUndefinedValueRootIndex); | 3017 context()->Plug(Heap::kUndefinedValueRootIndex); |
| 3020 break; | 3018 break; |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3613 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 3611 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 3614 __ add(pc, r1, Operand(masm_->CodeObject())); | 3612 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 3615 } | 3613 } |
| 3616 | 3614 |
| 3617 | 3615 |
| 3618 #undef __ | 3616 #undef __ |
| 3619 | 3617 |
| 3620 } } // namespace v8::internal | 3618 } } // namespace v8::internal |
| 3621 | 3619 |
| 3622 #endif // V8_TARGET_ARCH_ARM | 3620 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |