Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4477)

Unified Diff: runtime/vm/object.cc

Issue 2490363002: Clean up encoding of size and single entry flag in Instructions. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d00d18ae17e8b3bd87104a15cf8741b2c89bb6d8..315ed2e144b5e0ab9400735b42975e07bd307bf3 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -11384,7 +11384,8 @@ RawInstructions* Instructions::New(intptr_t size, bool has_single_entry_point) {
Object::Allocate(Instructions::kClassId, aligned_size, Heap::kCode);
NoSafepointScope no_safepoint;
result ^= raw;
- result.set_size(has_single_entry_point ? size : -size);
+ result.SetSize(size);
+ result.SetHasSingleEntryPoint(has_single_entry_point);
}
return result.raw();
}
@@ -13764,9 +13765,9 @@ void Code::Disassemble(DisassemblyFormatter* formatter) const {
const Instructions& instr = Instructions::Handle(instructions());
uword start = instr.PayloadStart();
if (formatter == NULL) {
- Disassembler::Disassemble(start, start + instr.size(), *this);
+ Disassembler::Disassemble(start, start + instr.Size(), *this);
} else {
- Disassembler::Disassemble(start, start + instr.size(), formatter, *this);
+ Disassembler::Disassemble(start, start + instr.Size(), formatter, *this);
}
#endif
}
@@ -13995,14 +13996,14 @@ RawCode* Code::FinalizeCode(const char* name,
// Copy the instructions into the instruction area and apply all fixups.
// Embedded pointers are still in handles at this point.
MemoryRegion region(reinterpret_cast<void*>(instrs.PayloadStart()),
- instrs.size());
+ instrs.Size());
assembler->FinalizeInstructions(region);
- CPU::FlushICache(instrs.PayloadStart(), instrs.size());
+ CPU::FlushICache(instrs.PayloadStart(), instrs.Size());
code.set_compile_timestamp(OS::GetCurrentMonotonicMicros());
#ifndef PRODUCT
CodeObservers::NotifyAll(name, instrs.PayloadStart(),
- assembler->prologue_offset(), instrs.size(),
+ assembler->prologue_offset(), instrs.Size(),
optimized);
#endif
{
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/precompiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698