Commit 57ce7d67 authored by heimbuef's avatar heimbuef Committed by Commit bot

Better pack fields in Variable

Used a BitField to for Variable fields instead of relying on the compiler, saving some memory probably.
This reduces sizeof(Variable) from 64 to 40 on x64

BUG=v8:5209

Committed: https://crrev.com/955606506c256ea389d6c4a8e07babfea512d190
Review-Url: https://codereview.chromium.org/2257493002
Cr-Original-Commit-Position: refs/heads/master@{#38891}
Cr-Commit-Position: refs/heads/master@{#38967}
parent ead8f658
......@@ -49,6 +49,7 @@ class Variable final : public ZoneObject {
return ForceContextAllocationField::decode(bit_field_);
}
void ForceContextAllocation() {
DCHECK(IsUnallocated() || IsContextSlot());
bit_field_ = ForceContextAllocationField::update(bit_field_, true);
}
bool is_used() { return IsUsedField::decode(bit_field_); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment