Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 875f6082d7d87b9aa40b21ab21d5223759a3867e..75808ff0a1591f8af65c229933ac24733a91d93c 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -302,24 +302,6 @@ void LCallConstantFunction::PrintDataTo(StringStream* stream) { |
} |
-ExternalReference LLinkObjectInList::GetReference(Isolate* isolate) { |
- switch (hydrogen()->known_list()) { |
- case HLinkObjectInList::ALLOCATION_SITE_LIST: |
- return ExternalReference::allocation_sites_list_address(isolate); |
- } |
- |
- UNREACHABLE(); |
- // Return a dummy value |
- return ExternalReference::isolate_address(isolate); |
-} |
- |
- |
-void LLinkObjectInList::PrintDataTo(StringStream* stream) { |
- object()->PrintTo(stream); |
- stream->Add(" offset %d", hydrogen()->store_field().offset()); |
-} |
- |
- |
void LLoadContextSlot::PrintDataTo(StringStream* stream) { |
context()->PrintTo(stream); |
stream->Add("[%d]", slot_index()); |
@@ -505,7 +487,7 @@ LPlatformChunk* LChunkBuilder::Build() { |
} |
-void LChunkBuilder::Abort(const char* reason) { |
+void LChunkBuilder::Abort(BailoutReason reason) { |
info()->set_bailout_reason(reason); |
status_ = ABORTED; |
} |
@@ -716,7 +698,7 @@ LUnallocated* LChunkBuilder::TempRegister() { |
new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); |
int vreg = allocator_->GetVirtualRegister(); |
if (!allocator_->AllocationOk()) { |
- Abort("Out of virtual registers while trying to allocate temp register."); |
+ Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); |
vreg = 0; |
} |
operand->set_virtual_register(vreg); |
@@ -2146,6 +2128,8 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
bool value_is_zero = BitCast<uint64_t, double>(value) == 0; |
LOperand* temp = value_is_zero ? NULL : TempRegister(); |
return DefineAsRegister(new(zone()) LConstantD(temp)); |
+ } else if (r.IsExternal()) { |
+ return DefineAsRegister(new(zone()) LConstantE); |
} else if (r.IsTagged()) { |
return DefineAsRegister(new(zone()) LConstantT); |
} else { |
@@ -2189,14 +2173,6 @@ LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { |
} |
-LInstruction* LChunkBuilder::DoLinkObjectInList(HLinkObjectInList* instr) { |
- LOperand* object = UseRegister(instr->value()); |
- LOperand* temp = TempRegister(); |
- LLinkObjectInList* result = new(zone()) LLinkObjectInList(object, temp); |
- return result; |
-} |
- |
- |
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
LOperand* context = UseRegisterAtStart(instr->value()); |
LInstruction* result = |
@@ -2222,7 +2198,10 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
- LOperand* obj = UseRegisterAtStart(instr->object()); |
+ LOperand* obj = (instr->access().IsExternalMemory() && |
+ instr->access().offset() == 0) |
+ ? UseRegisterOrConstantAtStart(instr->object()) |
+ : UseRegisterAtStart(instr->object()); |
return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
} |
@@ -2436,6 +2415,8 @@ LInstruction* LChunkBuilder::DoTrapAllocationMemento( |
LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
bool is_in_object = instr->access().IsInobject(); |
+ bool is_external_location = instr->access().IsExternalMemory() && |
+ instr->access().offset() == 0; |
bool needs_write_barrier = instr->NeedsWriteBarrier(); |
bool needs_write_barrier_for_map = !instr->transition().is_null() && |
instr->NeedsWriteBarrierForMap(); |
@@ -2445,6 +2426,11 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
obj = is_in_object |
? UseRegister(instr->object()) |
: UseTempRegister(instr->object()); |
+ } else if (is_external_location) { |
+ ASSERT(!is_in_object); |
+ ASSERT(!needs_write_barrier); |
+ ASSERT(!needs_write_barrier_for_map); |
+ obj = UseRegisterOrConstant(instr->object()); |
} else { |
obj = needs_write_barrier_for_map |
? UseRegister(instr->object()) |
@@ -2528,12 +2514,6 @@ LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
} |
-LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
- LOperand* string = UseRegisterAtStart(instr->value()); |
- return DefineAsRegister(new(zone()) LStringLength(string)); |
-} |
- |
- |
LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
info()->MarkAsDeferredCalling(); |
LOperand* context = UseAny(instr->context()); |
@@ -2587,7 +2567,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width. |
if (spill_index > LUnallocated::kMaxFixedSlotIndex) { |
- Abort("Too many spill slots needed for OSR"); |
+ Abort(kTooManySpillSlotsNeededForOSR); |
spill_index = 0; |
} |
return DefineAsSpilled(new(zone()) LUnknownOSRValue, spill_index); |