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 3713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3724 // The subexpression does not have side effects. | 3724 // The subexpression does not have side effects. |
3725 context()->Plug(false); | 3725 context()->Plug(false); |
3726 } else if (prop != NULL) { | 3726 } else if (prop != NULL) { |
3727 if (prop->is_synthetic()) { | 3727 if (prop->is_synthetic()) { |
3728 // Result of deleting parameters is false, even when they rewrite | 3728 // Result of deleting parameters is false, even when they rewrite |
3729 // to accesses on the arguments object. | 3729 // to accesses on the arguments object. |
3730 context()->Plug(false); | 3730 context()->Plug(false); |
3731 } else { | 3731 } else { |
3732 VisitForStackValue(prop->obj()); | 3732 VisitForStackValue(prop->obj()); |
3733 VisitForStackValue(prop->key()); | 3733 VisitForStackValue(prop->key()); |
| 3734 __ push(Immediate(Smi::FromInt(strict_mode_flag()))); |
3734 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 3735 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
3735 context()->Plug(eax); | 3736 context()->Plug(eax); |
3736 } | 3737 } |
3737 } else if (var->is_global()) { | 3738 } else if (var->is_global()) { |
| 3739 ASSERT(strict_mode_flag() == kNonStrictMode); |
3738 __ push(GlobalObjectOperand()); | 3740 __ push(GlobalObjectOperand()); |
3739 __ push(Immediate(var->name())); | 3741 __ push(Immediate(var->name())); |
| 3742 __ push(Immediate(Smi::FromInt(kNonStrictMode))); |
3740 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 3743 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
3741 context()->Plug(eax); | 3744 context()->Plug(eax); |
3742 } else { | 3745 } else { |
3743 // Non-global variable. Call the runtime to try to delete from the | 3746 // Non-global variable. Call the runtime to try to delete from the |
3744 // context where the variable was introduced. | 3747 // context where the variable was introduced. |
3745 __ push(context_register()); | 3748 __ push(context_register()); |
3746 __ push(Immediate(var->name())); | 3749 __ push(Immediate(var->name())); |
3747 __ CallRuntime(Runtime::kDeleteContextSlot, 2); | 3750 __ CallRuntime(Runtime::kDeleteContextSlot, 2); |
3748 context()->Plug(eax); | 3751 context()->Plug(eax); |
3749 } | 3752 } |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4407 // And return. | 4410 // And return. |
4408 __ ret(0); | 4411 __ ret(0); |
4409 } | 4412 } |
4410 | 4413 |
4411 | 4414 |
4412 #undef __ | 4415 #undef __ |
4413 | 4416 |
4414 } } // namespace v8::internal | 4417 } } // namespace v8::internal |
4415 | 4418 |
4416 #endif // V8_TARGET_ARCH_IA32 | 4419 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |