Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 062a1d259445592c81ed8cdbdc7016d55387cfd6..a4c51168714b30e4f2542a91937c63c906538468 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -1510,12 +1510,7 @@ void LCodeGen::DoConstantD(LConstantD* instr) { |
void LCodeGen::DoConstantT(LConstantT* instr) { |
Handle<Object> value = instr->value(); |
AllowDeferredHandleDereference smi_check; |
- if (value->IsSmi()) { |
- __ Move(ToRegister(instr->result()), value); |
- } else { |
- __ LoadHeapObject(ToRegister(instr->result()), |
- Handle<HeapObject>::cast(value)); |
- } |
+ __ LoadObject(ToRegister(instr->result()), value); |
} |
@@ -2703,9 +2698,9 @@ void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
__ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
__ movq(result, FieldOperand(result, offset + FixedArray::kHeaderSize)); |
} |
- } else if (lookup.IsConstantFunction()) { |
- Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*type)); |
- __ LoadHeapObject(result, function); |
+ } else if (lookup.IsConstant()) { |
+ Handle<Object> constant(lookup.GetConstantFromMap(*type), isolate()); |
+ __ LoadObject(result, constant); |
} else { |
// Negative lookup. |
// Check prototypes. |
@@ -2736,7 +2731,7 @@ static bool CompactEmit(SmallMapList* list, |
if (map->HasElementsTransition()) return false; |
LookupResult lookup(isolate); |
map->LookupDescriptor(NULL, *name, &lookup); |
- return lookup.IsField() || lookup.IsConstantFunction(); |
+ return lookup.IsField() || lookup.IsConstant(); |
} |