Chromium Code Reviews| 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 812 #endif | 812 #endif |
| 813 | 813 |
| 814 | 814 |
| 815 #ifdef ENABLE_DISASSEMBLER | 815 #ifdef ENABLE_DISASSEMBLER |
| 816 const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) { | 816 const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) { |
| 817 switch (rmode) { | 817 switch (rmode) { |
| 818 case NONE32: | 818 case NONE32: |
| 819 return "no reloc 32"; | 819 return "no reloc 32"; |
| 820 case NONE64: | 820 case NONE64: |
| 821 return "no reloc 64"; | 821 return "no reloc 64"; |
| 822 case NONEINTPTR: | |
| 823 return "no reloc intptr"; | |
| 822 case EMBEDDED_OBJECT: | 824 case EMBEDDED_OBJECT: |
| 823 return "embedded object"; | 825 return "embedded object"; |
| 824 case DEBUGGER_STATEMENT: | 826 case DEBUGGER_STATEMENT: |
| 825 return "debugger statement"; | 827 return "debugger statement"; |
| 826 case CODE_TARGET: | 828 case CODE_TARGET: |
| 827 return "code target"; | 829 return "code target"; |
| 828 case CODE_TARGET_WITH_ID: | 830 case CODE_TARGET_WITH_ID: |
| 829 return "code target with id"; | 831 return "code target with id"; |
| 830 case CELL: | 832 case CELL: |
| 831 return "property cell"; | 833 return "property cell"; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 959 case VENEER_POOL: | 961 case VENEER_POOL: |
| 960 case DEBUG_BREAK_SLOT_AT_POSITION: | 962 case DEBUG_BREAK_SLOT_AT_POSITION: |
| 961 case DEBUG_BREAK_SLOT_AT_RETURN: | 963 case DEBUG_BREAK_SLOT_AT_RETURN: |
| 962 case DEBUG_BREAK_SLOT_AT_CALL: | 964 case DEBUG_BREAK_SLOT_AT_CALL: |
| 963 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: | 965 case DEBUG_BREAK_SLOT_AT_TAIL_CALL: |
| 964 case GENERATOR_CONTINUATION: | 966 case GENERATOR_CONTINUATION: |
| 965 case WASM_MEMORY_REFERENCE: | 967 case WASM_MEMORY_REFERENCE: |
| 966 case WASM_MEMORY_SIZE_REFERENCE: | 968 case WASM_MEMORY_SIZE_REFERENCE: |
| 967 case NONE32: | 969 case NONE32: |
| 968 case NONE64: | 970 case NONE64: |
| 971 case NONEINTPTR: | |
| 969 break; | 972 break; |
| 970 case NUMBER_OF_MODES: | 973 case NUMBER_OF_MODES: |
| 971 case PC_JUMP: | 974 case PC_JUMP: |
| 972 UNREACHABLE(); | 975 UNREACHABLE(); |
| 973 break; | 976 break; |
| 974 case CODE_AGE_SEQUENCE: | 977 case CODE_AGE_SEQUENCE: |
| 975 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); | 978 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); |
| 976 break; | 979 break; |
| 977 } | 980 } |
| 978 } | 981 } |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1924 DCHECK(!emitted_label_.is_bound()); | 1927 DCHECK(!emitted_label_.is_bound()); |
| 1925 PerTypeEntryInfo& info = info_[type]; | 1928 PerTypeEntryInfo& info = info_[type]; |
| 1926 const int entry_size = ConstantPoolEntry::size(type); | 1929 const int entry_size = ConstantPoolEntry::size(type); |
| 1927 bool merged = false; | 1930 bool merged = false; |
| 1928 | 1931 |
| 1929 if (entry.sharing_ok()) { | 1932 if (entry.sharing_ok()) { |
| 1930 // Try to merge entries | 1933 // Try to merge entries |
| 1931 std::vector<ConstantPoolEntry>::iterator it = info.shared_entries.begin(); | 1934 std::vector<ConstantPoolEntry>::iterator it = info.shared_entries.begin(); |
| 1932 int end = static_cast<int>(info.shared_entries.size()); | 1935 int end = static_cast<int>(info.shared_entries.size()); |
| 1933 for (int i = 0; i < end; i++, it++) { | 1936 for (int i = 0; i < end; i++, it++) { |
| 1934 if ((entry_size == kPointerSize) ? entry.value() == it->value() | 1937 if ((entry_size == kPointerSize) ? entry.IntValueMayBeMergedWith(*it) |
|
bradnelson
2016/06/08 00:58:32
It seems strange to use carnal knowledge of entry
Mircea Trofin
2016/06/08 03:32:16
This is inherited (previous) code, and I agree, ov
| |
| 1935 : entry.value64() == it->value64()) { | 1938 : entry.value64() == it->value64()) { |
| 1936 // Merge with found entry. | 1939 // Merge with found entry. |
| 1937 entry.set_merged_index(i); | 1940 entry.set_merged_index(i); |
| 1938 merged = true; | 1941 merged = true; |
| 1939 break; | 1942 break; |
| 1940 } | 1943 } |
| 1941 } | 1944 } |
| 1942 } | 1945 } |
| 1943 | 1946 |
| 1944 // By definition, merged entries have regular access. | 1947 // By definition, merged entries have regular access. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2117 | 2120 |
| 2118 | 2121 |
| 2119 void Assembler::DataAlign(int m) { | 2122 void Assembler::DataAlign(int m) { |
| 2120 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 2123 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 2121 while ((pc_offset() & (m - 1)) != 0) { | 2124 while ((pc_offset() & (m - 1)) != 0) { |
| 2122 db(0); | 2125 db(0); |
| 2123 } | 2126 } |
| 2124 } | 2127 } |
| 2125 } // namespace internal | 2128 } // namespace internal |
| 2126 } // namespace v8 | 2129 } // namespace v8 |
| OLD | NEW |