Speeding up source map lookup for x64 disasm.

This commit is contained in:
Ben Vanik
2015-06-10 00:29:07 -07:00
parent 14e1438ec0
commit 9c58426231
4 changed files with 25 additions and 19 deletions

View File

@@ -255,7 +255,7 @@ void X64Emitter::MarkSourceOffset(const Instr* i) {
auto entry = source_map_arena_.Alloc<SourceMapEntry>();
entry->source_offset = static_cast<uint32_t>(i->src1.offset);
entry->hir_offset = uint32_t(i->block->ordinal << 16) | i->ordinal;
entry->code_offset = static_cast<uint32_t>(getSize());
entry->code_offset = static_cast<uint32_t>(getSize() + 1);
source_map_count_++;
if (FLAGS_debug) {