Chromium Code Reviews| 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 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3366 } else { | 3366 } else { |
| 3367 VisitForStackValue(prop->obj()); | 3367 VisitForStackValue(prop->obj()); |
| 3368 VisitForStackValue(prop->key()); | 3368 VisitForStackValue(prop->key()); |
| 3369 __ mov(r1, Operand(Smi::FromInt(strict_mode_flag()))); | 3369 __ mov(r1, Operand(Smi::FromInt(strict_mode_flag()))); |
| 3370 __ push(r1); | 3370 __ push(r1); |
| 3371 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); | 3371 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); |
| 3372 context()->Plug(r0); | 3372 context()->Plug(r0); |
| 3373 } | 3373 } |
| 3374 } else if (var != NULL) { | 3374 } else if (var != NULL) { |
| 3375 // Delete of an unqualified identifier is disallowed in strict mode | 3375 // Delete of an unqualified identifier is disallowed in strict mode |
| 3376 // so this code can only be reached in non-strict mode. | 3376 // (but "delete this" is). |
|
Mads Ager (chromium)
2011/02/22 07:42:28
Remove the parenthesis?
but "delete this" is all
Martin Maly
2011/02/22 17:21:42
Done.
| |
| 3377 ASSERT(strict_mode_flag() == kNonStrictMode); | 3377 ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this()); |
| 3378 if (var->is_global()) { | 3378 if (var->is_global()) { |
| 3379 __ ldr(r2, GlobalObjectOperand()); | 3379 __ ldr(r2, GlobalObjectOperand()); |
| 3380 __ mov(r1, Operand(var->name())); | 3380 __ mov(r1, Operand(var->name())); |
| 3381 __ mov(r0, Operand(Smi::FromInt(kNonStrictMode))); | 3381 __ mov(r0, Operand(Smi::FromInt(kNonStrictMode))); |
| 3382 __ Push(r2, r1, r0); | 3382 __ Push(r2, r1, r0); |
| 3383 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); | 3383 __ InvokeBuiltin(Builtins::DELETE, CALL_JS); |
| 3384 context()->Plug(r0); | 3384 context()->Plug(r0); |
| 3385 } else if (var->AsSlot() != NULL && | 3385 } else if (var->AsSlot() != NULL && |
| 3386 var->AsSlot()->type() != Slot::LOOKUP) { | 3386 var->AsSlot()->type() != Slot::LOOKUP) { |
| 3387 // Result of deleting non-global, non-dynamic variables is false. | 3387 // Result of deleting non-global, non-dynamic variables is false. |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4025 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4025 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 4026 __ add(pc, r1, Operand(masm_->CodeObject())); | 4026 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 4027 } | 4027 } |
| 4028 | 4028 |
| 4029 | 4029 |
| 4030 #undef __ | 4030 #undef __ |
| 4031 | 4031 |
| 4032 } } // namespace v8::internal | 4032 } } // namespace v8::internal |
| 4033 | 4033 |
| 4034 #endif // V8_TARGET_ARCH_ARM | 4034 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |