Index: src/a64/lithium-a64.cc |
diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc |
index 8fd59c779d0ae3c7123ce634da8b27f461245ca9..0017d9721508f0f4edeae51bb83e953d2aa64d00 100644 |
--- a/src/a64/lithium-a64.cc |
+++ b/src/a64/lithium-a64.cc |
@@ -284,24 +284,6 @@ void LGap::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()); |
@@ -396,7 +378,7 @@ const char* LArithmeticT::Mnemonic() const { |
} |
-void LChunkBuilder::Abort(const char* reason) { |
+void LChunkBuilder::Abort(BailoutReason reason) { |
info()->set_bailout_reason(reason); |
status_ = ABORTED; |
} |
@@ -567,7 +549,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); |
@@ -850,10 +832,7 @@ LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
#define UNIMPLEMENTED_INSTRUCTION() \ |
do { \ |
- static char msg[128]; \ |
- snprintf(msg, sizeof(msg), \ |
- "unsupported hydrogen instruction (%s)", __func__); \ |
- info_->set_bailout_reason(msg); \ |
+ info_->set_bailout_reason(kUnimplementedHydrogenInstruction); \ |
status_ = ABORTED; \ |
return NULL; \ |
} while (0) |
@@ -1387,6 +1366,8 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
return DefineAsRegister(new(zone()) LConstantI); |
} else if (r.IsDouble()) { |
return DefineAsRegister(new(zone()) LConstantD); |
+ } else if (r.IsExternal()) { |
+ return DefineAsRegister(new(zone()) LConstantE); |
} else if (r.IsTagged()) { |
return DefineAsRegister(new(zone()) LConstantT); |
} else { |
@@ -1650,14 +1631,6 @@ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* 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 = |
@@ -2299,13 +2272,6 @@ LInstruction* LChunkBuilder::DoStringCompareAndBranch( |
} |
-LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
- // TODO(all): This instruction doesn't exist anymore on bleeding_edge. |
- LOperand* string = UseRegisterAtStart(instr->value()); |
- return DefineAsRegister(new(zone()) LStringLength(string)); |
-} |
- |
- |
LInstruction* LChunkBuilder::DoSub(HSub* instr) { |
// TODO(jbramley): Add smi support. |
if (instr->representation().IsInteger32()) { |
@@ -2411,6 +2377,7 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
switch (instr->op()) { |
case kMathAbs: { |
Representation r = instr->representation(); |
+ // TODO(jbramley): Support smis in LMathAbs and use that. |
if (r.IsTagged() || r.IsSmi()) { |
// The tagged case might need to allocate a HeapNumber for the result, |
// so it is handled by a separate LInstruction. |
@@ -2518,7 +2485,7 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
int spill_index = chunk_->GetNextSpillIndex(); |
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); |