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

Unified Diff: src/lithium-allocator.cc

Issue 8462016: Make LiveRange objects 1 word smaller by using a bool instead of enum for register kind. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | « src/lithium-allocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-allocator.cc
===================================================================
--- src/lithium-allocator.cc (revision 9943)
+++ src/lithium-allocator.cc (working copy)
@@ -152,8 +152,8 @@
LiveRange::LiveRange(int id)
: id_(id),
spilled_(false),
+ is_double_(false),
assigned_register_(kInvalidAssignment),
- assigned_register_kind_(NONE),
last_interval_(NULL),
first_interval_(NULL),
first_pos_(NULL),
@@ -169,7 +169,7 @@
void LiveRange::set_assigned_register(int reg, RegisterKind register_kind) {
ASSERT(!HasRegisterAssigned() && !IsSpilled());
assigned_register_ = reg;
- assigned_register_kind_ = register_kind;
+ is_double_ = (register_kind == DOUBLE_REGISTERS);
ConvertOperands();
}
@@ -555,7 +555,7 @@
reusable_slots_(8),
next_virtual_register_(num_values),
first_artificial_register_(num_values),
- mode_(NONE),
+ mode_(GENERAL_REGISTERS),
num_registers_(-1),
graph_(graph),
has_osr_entry_(false) {}
@@ -1466,7 +1466,6 @@
void LAllocator::AllocateGeneralRegisters() {
HPhase phase("Allocate general registers", this);
num_registers_ = Register::kNumAllocatableRegisters;
- mode_ = GENERAL_REGISTERS;
AllocateRegisters();
}
@@ -1480,7 +1479,6 @@
void LAllocator::AllocateRegisters() {
- ASSERT(mode_ != NONE);
ASSERT(unhandled_live_ranges_.is_empty());
for (int i = 0; i < live_ranges_.length(); ++i) {
@@ -1585,7 +1583,6 @@
const char* LAllocator::RegisterName(int allocation_index) {
- ASSERT(mode_ != NONE);
if (mode_ == GENERAL_REGISTERS) {
return Register::AllocationIndexToString(allocation_index);
} else {
« no previous file with comments | « src/lithium-allocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698