OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 5831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5842 | 5842 |
5843 } else if (variable != NULL) { | 5843 } else if (variable != NULL) { |
5844 Slot* slot = variable->AsSlot(); | 5844 Slot* slot = variable->AsSlot(); |
5845 if (variable->is_global()) { | 5845 if (variable->is_global()) { |
5846 LoadGlobal(); | 5846 LoadGlobal(); |
5847 frame_->EmitPush(Operand(variable->name())); | 5847 frame_->EmitPush(Operand(variable->name())); |
5848 frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 2); | 5848 frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 2); |
5849 frame_->EmitPush(r0); | 5849 frame_->EmitPush(r0); |
5850 | 5850 |
5851 } else if (slot != NULL && slot->type() == Slot::LOOKUP) { | 5851 } else if (slot != NULL && slot->type() == Slot::LOOKUP) { |
5852 // lookup the context holding the named variable | 5852 // Delete from the context holding the named variable. |
5853 frame_->EmitPush(cp); | 5853 frame_->EmitPush(cp); |
5854 frame_->EmitPush(Operand(variable->name())); | 5854 frame_->EmitPush(Operand(variable->name())); |
5855 frame_->CallRuntime(Runtime::kLookupContext, 2); | 5855 frame_->CallRuntime(Runtime::kDeleteContextSlot, 2); |
5856 // r0: context | |
5857 frame_->EmitPush(r0); | |
5858 frame_->EmitPush(Operand(variable->name())); | |
5859 frame_->InvokeBuiltin(Builtins::DELETE, CALL_JS, 2); | |
5860 frame_->EmitPush(r0); | 5856 frame_->EmitPush(r0); |
5861 | 5857 |
5862 } else { | 5858 } else { |
5863 // Default: Result of deleting non-global, not dynamically | 5859 // Default: Result of deleting non-global, not dynamically |
5864 // introduced variables is false. | 5860 // introduced variables is false. |
5865 frame_->EmitPushRoot(Heap::kFalseValueRootIndex); | 5861 frame_->EmitPushRoot(Heap::kFalseValueRootIndex); |
5866 } | 5862 } |
5867 | 5863 |
5868 } else { | 5864 } else { |
5869 // Default: Result of deleting expressions is true. | 5865 // Default: Result of deleting expressions is true. |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7367 BinaryOpIC::GetName(runtime_operands_type_)); | 7363 BinaryOpIC::GetName(runtime_operands_type_)); |
7368 return name_; | 7364 return name_; |
7369 } | 7365 } |
7370 | 7366 |
7371 | 7367 |
7372 #undef __ | 7368 #undef __ |
7373 | 7369 |
7374 } } // namespace v8::internal | 7370 } } // namespace v8::internal |
7375 | 7371 |
7376 #endif // V8_TARGET_ARCH_ARM | 7372 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |