OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 // The stored-to slot holds the same value as the top but | 768 // The stored-to slot holds the same value as the top but |
769 // unsynced. (We do not have copies of constants yet.) | 769 // unsynced. (We do not have copies of constants yet.) |
770 ASSERT(top.is_constant()); | 770 ASSERT(top.is_constant()); |
771 elements_[index].clear_sync(); | 771 elements_[index].clear_sync(); |
772 } | 772 } |
773 } | 773 } |
774 | 774 |
775 | 775 |
776 void VirtualFrame::PushTryHandler(HandlerType type) { | 776 void VirtualFrame::PushTryHandler(HandlerType type) { |
777 ASSERT(cgen()->HasValidEntryRegisters()); | 777 ASSERT(cgen()->HasValidEntryRegisters()); |
778 // Grow the expression stack by handler size less two (the return address | 778 // Grow the expression stack by handler size less one (the return |
779 // is already pushed by a call instruction, and PushTryHandler from the | 779 // address is already pushed by a call instruction). |
780 // macro assembler will leave the top of stack in the eax register to be | 780 Adjust(kHandlerSize - 1); |
781 // pushed separately). | |
782 Adjust(kHandlerSize - 2); | |
783 __ PushTryHandler(IN_JAVASCRIPT, type); | 781 __ PushTryHandler(IN_JAVASCRIPT, type); |
784 // TODO(1222589): remove the reliance of PushTryHandler on a cached TOS | |
785 EmitPush(eax); | |
786 } | 782 } |
787 | 783 |
788 | 784 |
789 Result VirtualFrame::RawCallStub(CodeStub* stub) { | 785 Result VirtualFrame::RawCallStub(CodeStub* stub) { |
790 ASSERT(cgen()->HasValidEntryRegisters()); | 786 ASSERT(cgen()->HasValidEntryRegisters()); |
791 __ CallStub(stub); | 787 __ CallStub(stub); |
792 Result result = cgen()->allocator()->Allocate(eax); | 788 Result result = cgen()->allocator()->Allocate(eax); |
793 ASSERT(result.is_valid()); | 789 ASSERT(result.is_valid()); |
794 return result; | 790 return result; |
795 } | 791 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 ASSERT(stack_pointer_ == element_count() - 1); | 1085 ASSERT(stack_pointer_ == element_count() - 1); |
1090 elements_.Add(FrameElement::MemoryElement()); | 1086 elements_.Add(FrameElement::MemoryElement()); |
1091 stack_pointer_++; | 1087 stack_pointer_++; |
1092 __ push(immediate); | 1088 __ push(immediate); |
1093 } | 1089 } |
1094 | 1090 |
1095 | 1091 |
1096 #undef __ | 1092 #undef __ |
1097 | 1093 |
1098 } } // namespace v8::internal | 1094 } } // namespace v8::internal |
OLD | NEW |