Index: src/assembler.cc |
diff --git a/src/assembler.cc b/src/assembler.cc |
index 553e37da40e125c0c22f4d7de5eac3aacf44e5d4..120b087869aa7c01f9ca618eb06c86c180bafc25 100644 |
--- a/src/assembler.cc |
+++ b/src/assembler.cc |
@@ -819,6 +819,8 @@ const char* RelocInfo::RelocModeName(RelocInfo::Mode rmode) { |
return "no reloc 32"; |
case NONE64: |
return "no reloc 64"; |
+ case NONEINTPTR: |
+ return "no reloc intptr"; |
case EMBEDDED_OBJECT: |
return "embedded object"; |
case DEBUGGER_STATEMENT: |
@@ -966,6 +968,7 @@ void RelocInfo::Verify(Isolate* isolate) { |
case WASM_MEMORY_SIZE_REFERENCE: |
case NONE32: |
case NONE64: |
+ case NONEINTPTR: |
break; |
case NUMBER_OF_MODES: |
case PC_JUMP: |
@@ -1918,12 +1921,10 @@ ConstantPoolEntry::Access ConstantPoolBuilder::NextAccess( |
return ConstantPoolEntry::REGULAR; |
} |
- |
ConstantPoolEntry::Access ConstantPoolBuilder::AddEntry( |
- ConstantPoolEntry& entry, ConstantPoolEntry::Type type) { |
+ ConstantPoolEntry& entry) { |
DCHECK(!emitted_label_.is_bound()); |
- PerTypeEntryInfo& info = info_[type]; |
- const int entry_size = ConstantPoolEntry::size(type); |
+ PerTypeEntryInfo& info = info_[entry.type()]; |
bool merged = false; |
if (entry.sharing_ok()) { |
@@ -1931,8 +1932,7 @@ ConstantPoolEntry::Access ConstantPoolBuilder::AddEntry( |
std::vector<ConstantPoolEntry>::iterator it = info.shared_entries.begin(); |
int end = static_cast<int>(info.shared_entries.size()); |
for (int i = 0; i < end; i++, it++) { |
- if ((entry_size == kPointerSize) ? entry.value() == it->value() |
- : entry.value64() == it->value64()) { |
+ if (entry.MayBeMergedWith(*it)) { |
// Merge with found entry. |
entry.set_merged_index(i); |
merged = true; |
@@ -1944,7 +1944,7 @@ ConstantPoolEntry::Access ConstantPoolBuilder::AddEntry( |
// By definition, merged entries have regular access. |
DCHECK(!merged || entry.merged_index() < info.regular_count); |
ConstantPoolEntry::Access access = |
- (merged ? ConstantPoolEntry::REGULAR : NextAccess(type)); |
+ (merged ? ConstantPoolEntry::REGULAR : NextAccess(entry.type())); |
// Enforce an upper bound on search time by limiting the search to |
// unique sharable entries which fit in the regular section. |
@@ -1972,7 +1972,7 @@ void ConstantPoolBuilder::EmitSharedEntries(Assembler* assm, |
ConstantPoolEntry::Type type) { |
PerTypeEntryInfo& info = info_[type]; |
std::vector<ConstantPoolEntry>& shared_entries = info.shared_entries; |
- const int entry_size = ConstantPoolEntry::size(type); |
+ const int entry_size = ConstantPoolEntry::SizeOfType(type); |
int base = emitted_label_.pos(); |
DCHECK(base > 0); |
int shared_end = static_cast<int>(shared_entries.size()); |
@@ -2001,7 +2001,7 @@ void ConstantPoolBuilder::EmitGroup(Assembler* assm, |
const bool overflow = info.overflow(); |
std::vector<ConstantPoolEntry>& entries = info.entries; |
std::vector<ConstantPoolEntry>& shared_entries = info.shared_entries; |
- const int entry_size = ConstantPoolEntry::size(type); |
+ const int entry_size = ConstantPoolEntry::SizeOfType(type); |
int base = emitted_label_.pos(); |
DCHECK(base > 0); |
int begin; |