| 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 3052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3063 // The subexpression does not have side effects. | 3063 // The subexpression does not have side effects. |
| 3064 context()->Plug(false); | 3064 context()->Plug(false); |
| 3065 } else if (prop != NULL) { | 3065 } else if (prop != NULL) { |
| 3066 if (prop->is_synthetic()) { | 3066 if (prop->is_synthetic()) { |
| 3067 // Result of deleting parameters is false, even when they rewrite | 3067 // Result of deleting parameters is false, even when they rewrite |
| 3068 // to accesses on the arguments object. | 3068 // to accesses on the arguments object. |
| 3069 context()->Plug(false); | 3069 context()->Plug(false); |
| 3070 } else { | 3070 } else { |
| 3071 VisitForStackValue(prop->obj()); | 3071 VisitForStackValue(prop->obj()); |
| 3072 VisitForStackValue(prop->key()); | 3072 VisitForStackValue(prop->key()); |
| 3073 __ Push(Smi::FromInt(strict_mode_flag())); |
| 3073 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 3074 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 3074 context()->Plug(rax); | 3075 context()->Plug(rax); |
| 3075 } | 3076 } |
| 3076 } else if (var->is_global()) { | 3077 } else if (var->is_global()) { |
| 3078 ASSERT(strict_mode_flag() == kNonStrictMode); |
| 3077 __ push(GlobalObjectOperand()); | 3079 __ push(GlobalObjectOperand()); |
| 3078 __ Push(var->name()); | 3080 __ Push(var->name()); |
| 3081 __ Push(Smi::FromInt(kNonStrictMode)); |
| 3079 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); | 3082 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
| 3080 context()->Plug(rax); | 3083 context()->Plug(rax); |
| 3081 } else { | 3084 } else { |
| 3082 // Non-global variable. Call the runtime to try to delete from the | 3085 // Non-global variable. Call the runtime to try to delete from the |
| 3083 // context where the variable was introduced. | 3086 // context where the variable was introduced. |
| 3084 __ push(context_register()); | 3087 __ push(context_register()); |
| 3085 __ Push(var->name()); | 3088 __ Push(var->name()); |
| 3086 __ CallRuntime(Runtime::kDeleteContextSlot, 2); | 3089 __ CallRuntime(Runtime::kDeleteContextSlot, 2); |
| 3087 context()->Plug(rax); | 3090 context()->Plug(rax); |
| 3088 } | 3091 } |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3746 __ ret(0); | 3749 __ ret(0); |
| 3747 } | 3750 } |
| 3748 | 3751 |
| 3749 | 3752 |
| 3750 #undef __ | 3753 #undef __ |
| 3751 | 3754 |
| 3752 | 3755 |
| 3753 } } // namespace v8::internal | 3756 } } // namespace v8::internal |
| 3754 | 3757 |
| 3755 #endif // V8_TARGET_ARCH_X64 | 3758 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |