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 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3068 context()->Plug(false); | 3068 context()->Plug(false); |
3069 } else { | 3069 } else { |
3070 VisitForStackValue(prop->obj()); | 3070 VisitForStackValue(prop->obj()); |
3071 VisitForStackValue(prop->key()); | 3071 VisitForStackValue(prop->key()); |
3072 __ Push(Smi::FromInt(strict_mode_flag())); | 3072 __ Push(Smi::FromInt(strict_mode_flag())); |
3073 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 3073 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
3074 context()->Plug(rax); | 3074 context()->Plug(rax); |
3075 } | 3075 } |
3076 } else if (var != NULL) { | 3076 } else if (var != NULL) { |
3077 // Delete of an unqualified identifier is disallowed in strict mode | 3077 // Delete of an unqualified identifier is disallowed in strict mode |
3078 // so this code can only be reached in non-strict mode. | 3078 // (but "delete this" is). |
3079 ASSERT(strict_mode_flag() == kNonStrictMode); | 3079 ASSERT(strict_mode_flag() == kNonStrictMode || var->is_this()); |
3080 if (var->is_global()) { | 3080 if (var->is_global()) { |
3081 __ push(GlobalObjectOperand()); | 3081 __ push(GlobalObjectOperand()); |
3082 __ Push(var->name()); | 3082 __ Push(var->name()); |
3083 __ Push(Smi::FromInt(kNonStrictMode)); | 3083 __ Push(Smi::FromInt(kNonStrictMode)); |
3084 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 3084 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
3085 context()->Plug(rax); | 3085 context()->Plug(rax); |
3086 } else if (var->AsSlot() != NULL && | 3086 } else if (var->AsSlot() != NULL && |
3087 var->AsSlot()->type() != Slot::LOOKUP) { | 3087 var->AsSlot()->type() != Slot::LOOKUP) { |
3088 // Result of deleting non-global, non-dynamic variables is false. | 3088 // Result of deleting non-global, non-dynamic variables is false. |
3089 // The subexpression does not have side effects. | 3089 // The subexpression does not have side effects. |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3768 __ ret(0); | 3768 __ ret(0); |
3769 } | 3769 } |
3770 | 3770 |
3771 | 3771 |
3772 #undef __ | 3772 #undef __ |
3773 | 3773 |
3774 | 3774 |
3775 } } // namespace v8::internal | 3775 } } // namespace v8::internal |
3776 | 3776 |
3777 #endif // V8_TARGET_ARCH_X64 | 3777 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |