| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 case DEBUGGER_STATEMENT: | 740 case DEBUGGER_STATEMENT: |
| 741 return "debugger statement"; | 741 return "debugger statement"; |
| 742 case CODE_TARGET: | 742 case CODE_TARGET: |
| 743 return "code target"; | 743 return "code target"; |
| 744 case CODE_TARGET_WITH_ID: | 744 case CODE_TARGET_WITH_ID: |
| 745 return "code target with id"; | 745 return "code target with id"; |
| 746 case CELL: | 746 case CELL: |
| 747 return "property cell"; | 747 return "property cell"; |
| 748 case RUNTIME_ENTRY: | 748 case RUNTIME_ENTRY: |
| 749 return "runtime entry"; | 749 return "runtime entry"; |
| 750 case JS_RETURN: | |
| 751 return "js return"; | |
| 752 case COMMENT: | 750 case COMMENT: |
| 753 return "comment"; | 751 return "comment"; |
| 754 case POSITION: | 752 case POSITION: |
| 755 return "position"; | 753 return "position"; |
| 756 case STATEMENT_POSITION: | 754 case STATEMENT_POSITION: |
| 757 return "statement position"; | 755 return "statement position"; |
| 758 case EXTERNAL_REFERENCE: | 756 case EXTERNAL_REFERENCE: |
| 759 return "external reference"; | 757 return "external reference"; |
| 760 case INTERNAL_REFERENCE: | 758 case INTERNAL_REFERENCE: |
| 761 return "internal reference"; | 759 return "internal reference"; |
| 762 case INTERNAL_REFERENCE_ENCODED: | 760 case INTERNAL_REFERENCE_ENCODED: |
| 763 return "encoded internal reference"; | 761 return "encoded internal reference"; |
| 764 case DEOPT_REASON: | 762 case DEOPT_REASON: |
| 765 return "deopt reason"; | 763 return "deopt reason"; |
| 766 case CONST_POOL: | 764 case CONST_POOL: |
| 767 return "constant pool"; | 765 return "constant pool"; |
| 768 case VENEER_POOL: | 766 case VENEER_POOL: |
| 769 return "veneer pool"; | 767 return "veneer pool"; |
| 770 case DEBUG_BREAK_SLOT_AT_POSITION: | 768 case DEBUG_BREAK_SLOT_AT_POSITION: |
| 771 return "debug break slot at position"; | 769 return "debug break slot at position"; |
| 770 case DEBUG_BREAK_SLOT_AT_RETURN: |
| 771 return "debug break slot at return"; |
| 772 case DEBUG_BREAK_SLOT_AT_CALL: | 772 case DEBUG_BREAK_SLOT_AT_CALL: |
| 773 return "debug break slot at call"; | 773 return "debug break slot at call"; |
| 774 case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL: | 774 case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL: |
| 775 return "debug break slot at construct call"; | 775 return "debug break slot at construct call"; |
| 776 case CODE_AGE_SEQUENCE: | 776 case CODE_AGE_SEQUENCE: |
| 777 return "code age sequence"; | 777 return "code age sequence"; |
| 778 case GENERATOR_CONTINUATION: | 778 case GENERATOR_CONTINUATION: |
| 779 return "generator continuation"; | 779 return "generator continuation"; |
| 780 case NUMBER_OF_MODES: | 780 case NUMBER_OF_MODES: |
| 781 case PC_JUMP: | 781 case PC_JUMP: |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 case INTERNAL_REFERENCE: | 853 case INTERNAL_REFERENCE: |
| 854 case INTERNAL_REFERENCE_ENCODED: { | 854 case INTERNAL_REFERENCE_ENCODED: { |
| 855 Address target = target_internal_reference(); | 855 Address target = target_internal_reference(); |
| 856 Address pc = target_internal_reference_address(); | 856 Address pc = target_internal_reference_address(); |
| 857 Code* code = Code::cast(isolate->FindCodeObject(pc)); | 857 Code* code = Code::cast(isolate->FindCodeObject(pc)); |
| 858 CHECK(target >= code->instruction_start()); | 858 CHECK(target >= code->instruction_start()); |
| 859 CHECK(target <= code->instruction_end()); | 859 CHECK(target <= code->instruction_end()); |
| 860 break; | 860 break; |
| 861 } | 861 } |
| 862 case RUNTIME_ENTRY: | 862 case RUNTIME_ENTRY: |
| 863 case JS_RETURN: | |
| 864 case COMMENT: | 863 case COMMENT: |
| 865 case POSITION: | 864 case POSITION: |
| 866 case STATEMENT_POSITION: | 865 case STATEMENT_POSITION: |
| 867 case EXTERNAL_REFERENCE: | 866 case EXTERNAL_REFERENCE: |
| 868 case DEOPT_REASON: | 867 case DEOPT_REASON: |
| 869 case CONST_POOL: | 868 case CONST_POOL: |
| 870 case VENEER_POOL: | 869 case VENEER_POOL: |
| 871 case DEBUG_BREAK_SLOT_AT_POSITION: | 870 case DEBUG_BREAK_SLOT_AT_POSITION: |
| 871 case DEBUG_BREAK_SLOT_AT_RETURN: |
| 872 case DEBUG_BREAK_SLOT_AT_CALL: | 872 case DEBUG_BREAK_SLOT_AT_CALL: |
| 873 case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL: | 873 case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL: |
| 874 case GENERATOR_CONTINUATION: | 874 case GENERATOR_CONTINUATION: |
| 875 case NONE32: | 875 case NONE32: |
| 876 case NONE64: | 876 case NONE64: |
| 877 break; | 877 break; |
| 878 case NUMBER_OF_MODES: | 878 case NUMBER_OF_MODES: |
| 879 case PC_JUMP: | 879 case PC_JUMP: |
| 880 UNREACHABLE(); | 880 UNREACHABLE(); |
| 881 break; | 881 break; |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 | 1799 |
| 1800 | 1800 |
| 1801 void Assembler::RecordComment(const char* msg) { | 1801 void Assembler::RecordComment(const char* msg) { |
| 1802 if (FLAG_code_comments) { | 1802 if (FLAG_code_comments) { |
| 1803 EnsureSpace ensure_space(this); | 1803 EnsureSpace ensure_space(this); |
| 1804 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); | 1804 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); |
| 1805 } | 1805 } |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 | 1808 |
| 1809 void Assembler::RecordJSReturn() { | |
| 1810 positions_recorder()->WriteRecordedPositions(); | |
| 1811 EnsureSpace ensure_space(this); | |
| 1812 RecordRelocInfo(RelocInfo::JS_RETURN); | |
| 1813 } | |
| 1814 | |
| 1815 | |
| 1816 void Assembler::RecordGeneratorContinuation() { | 1809 void Assembler::RecordGeneratorContinuation() { |
| 1817 EnsureSpace ensure_space(this); | 1810 EnsureSpace ensure_space(this); |
| 1818 RecordRelocInfo(RelocInfo::GENERATOR_CONTINUATION); | 1811 RecordRelocInfo(RelocInfo::GENERATOR_CONTINUATION); |
| 1819 } | 1812 } |
| 1820 | 1813 |
| 1821 | 1814 |
| 1822 void Assembler::RecordDebugBreakSlot() { | 1815 void Assembler::RecordDebugBreakSlot(RelocInfo::Mode mode, int call_argc) { |
| 1823 EnsureSpace ensure_space(this); | 1816 EnsureSpace ensure_space(this); |
| 1824 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT_AT_POSITION); | 1817 DCHECK(RelocInfo::IsDebugBreakSlot(mode)); |
| 1818 intptr_t data = static_cast<intptr_t>(call_argc); |
| 1819 RecordRelocInfo(mode, data); |
| 1825 } | 1820 } |
| 1826 | 1821 |
| 1827 | 1822 |
| 1828 void Assembler::RecordDebugBreakSlotForCall(int argc) { | |
| 1829 EnsureSpace ensure_space(this); | |
| 1830 intptr_t data = static_cast<intptr_t>(argc); | |
| 1831 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT_AT_CALL, data); | |
| 1832 } | |
| 1833 | |
| 1834 | |
| 1835 void Assembler::RecordDebugBreakSlotForConstructCall() { | |
| 1836 EnsureSpace ensure_space(this); | |
| 1837 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL); | |
| 1838 } | |
| 1839 | |
| 1840 | |
| 1841 void Assembler::DataAlign(int m) { | 1823 void Assembler::DataAlign(int m) { |
| 1842 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1824 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 1843 while ((pc_offset() & (m - 1)) != 0) { | 1825 while ((pc_offset() & (m - 1)) != 0) { |
| 1844 db(0); | 1826 db(0); |
| 1845 } | 1827 } |
| 1846 } | 1828 } |
| 1847 } // namespace internal | 1829 } // namespace internal |
| 1848 } // namespace v8 | 1830 } // namespace v8 |
| OLD | NEW |