| 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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) { | 759 const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) { |
| 760 switch (rmode) { | 760 switch (rmode) { |
| 761 case RelocInfo::NONE32: | 761 case RelocInfo::NONE32: |
| 762 return "no reloc 32"; | 762 return "no reloc 32"; |
| 763 case RelocInfo::NONE64: | 763 case RelocInfo::NONE64: |
| 764 return "no reloc 64"; | 764 return "no reloc 64"; |
| 765 case RelocInfo::EMBEDDED_OBJECT: | 765 case RelocInfo::EMBEDDED_OBJECT: |
| 766 return "embedded object"; | 766 return "embedded object"; |
| 767 case RelocInfo::CONSTRUCT_CALL: | 767 case RelocInfo::CONSTRUCT_CALL: |
| 768 return "code target (js construct call)"; | 768 return "code target (js construct call)"; |
| 769 case RelocInfo::CODE_TARGET_CONTEXT: | |
| 770 return "code target (context)"; | |
| 771 case RelocInfo::DEBUG_BREAK: | 769 case RelocInfo::DEBUG_BREAK: |
| 772 #ifndef ENABLE_DEBUGGER_SUPPORT | 770 #ifndef ENABLE_DEBUGGER_SUPPORT |
| 773 UNREACHABLE(); | 771 UNREACHABLE(); |
| 774 #endif | 772 #endif |
| 775 return "debug break"; | 773 return "debug break"; |
| 776 case RelocInfo::CODE_TARGET: | 774 case RelocInfo::CODE_TARGET: |
| 777 return "code target"; | 775 return "code target"; |
| 778 case RelocInfo::CODE_TARGET_WITH_ID: | 776 case RelocInfo::CODE_TARGET_WITH_ID: |
| 779 return "code target with id"; | 777 return "code target with id"; |
| 780 case RelocInfo::CELL: | 778 case RelocInfo::CELL: |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 break; | 853 break; |
| 856 case CELL: | 854 case CELL: |
| 857 Object::VerifyPointer(target_cell()); | 855 Object::VerifyPointer(target_cell()); |
| 858 break; | 856 break; |
| 859 case DEBUG_BREAK: | 857 case DEBUG_BREAK: |
| 860 #ifndef ENABLE_DEBUGGER_SUPPORT | 858 #ifndef ENABLE_DEBUGGER_SUPPORT |
| 861 UNREACHABLE(); | 859 UNREACHABLE(); |
| 862 break; | 860 break; |
| 863 #endif | 861 #endif |
| 864 case CONSTRUCT_CALL: | 862 case CONSTRUCT_CALL: |
| 865 case CODE_TARGET_CONTEXT: | |
| 866 case CODE_TARGET_WITH_ID: | 863 case CODE_TARGET_WITH_ID: |
| 867 case CODE_TARGET: { | 864 case CODE_TARGET: { |
| 868 // convert inline target address to code object | 865 // convert inline target address to code object |
| 869 Address addr = target_address(); | 866 Address addr = target_address(); |
| 870 CHECK(addr != NULL); | 867 CHECK(addr != NULL); |
| 871 // Check that we can find the right code object. | 868 // Check that we can find the right code object. |
| 872 Code* code = Code::GetCodeFromTargetAddress(addr); | 869 Code* code = Code::GetCodeFromTargetAddress(addr); |
| 873 Object* found = code->GetIsolate()->FindCodeObject(addr); | 870 Object* found = code->GetIsolate()->FindCodeObject(addr); |
| 874 CHECK(found->IsCode()); | 871 CHECK(found->IsCode()); |
| 875 CHECK(code->address() == HeapObject::cast(found)->address()); | 872 CHECK(code->address() == HeapObject::cast(found)->address()); |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1656 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1660 state_.written_position = state_.current_position; | 1657 state_.written_position = state_.current_position; |
| 1661 written = true; | 1658 written = true; |
| 1662 } | 1659 } |
| 1663 | 1660 |
| 1664 // Return whether something was written. | 1661 // Return whether something was written. |
| 1665 return written; | 1662 return written; |
| 1666 } | 1663 } |
| 1667 | 1664 |
| 1668 } } // namespace v8::internal | 1665 } } // namespace v8::internal |
| OLD | NEW |