Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 3386e60cb08cfcedf1a0cc2f4f1cd07bfa0963a8..6184bb9e46b25c6a22015b216a3e60046a537f2d 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5533,11 +5533,9 @@ static bool IsFastLiteral(Handle<JSObject> boilerplate, |
for (int i = 0; i < limit; i++) { |
PropertyDetails details = descriptors->GetDetails(i); |
if (details.type() != FIELD) continue; |
+ int index = descriptors->GetFieldIndex(i); |
if ((*max_properties)-- == 0) return false; |
- FieldIndex field_index = FieldIndex::ForDescriptor(boilerplate->map(), i); |
- if (boilerplate->IsUnboxedDoubleField(field_index)) continue; |
- Handle<Object> value(boilerplate->RawFastPropertyAt(field_index), |
- isolate); |
+ Handle<Object> value(boilerplate->InObjectPropertyAt(index), isolate); |
if (value->IsJSObject()) { |
Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
if (!IsFastLiteral(value_object, |
@@ -5840,8 +5838,7 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField( |
} |
HObjectAccess access = info->access(); |
- if (access.representation().IsDouble() && |
- (!FLAG_unbox_double_fields || !access.IsInobject())) { |
+ if (access.representation().IsDouble()) { |
// Load the heap number. |
checked_object = Add<HLoadNamedField>( |
checked_object, static_cast<HValue*>(NULL), |
@@ -5873,8 +5870,7 @@ HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField( |
HObjectAccess field_access = info->access(); |
HStoreNamedField *instr; |
- if (field_access.representation().IsDouble() && |
- (!FLAG_unbox_double_fields || !field_access.IsInobject())) { |
+ if (field_access.representation().IsDouble()) { |
HObjectAccess heap_number_access = |
field_access.WithRepresentation(Representation::Tagged()); |
if (transition_to_field) { |
@@ -11190,27 +11186,18 @@ void HOptimizedGraphBuilder::BuildEmitInObjectProperties( |
PropertyDetails details = descriptors->GetDetails(i); |
if (details.type() != FIELD) continue; |
copied_fields++; |
- FieldIndex field_index = FieldIndex::ForDescriptor(*boilerplate_map, i); |
- |
- |
- int property_offset = field_index.offset(); |
+ int index = descriptors->GetFieldIndex(i); |
+ int property_offset = boilerplate_object->GetInObjectPropertyOffset(index); |
Handle<Name> name(descriptors->GetKey(i)); |
+ Handle<Object> value = |
+ Handle<Object>(boilerplate_object->InObjectPropertyAt(index), |
+ isolate()); |
// The access for the store depends on the type of the boilerplate. |
HObjectAccess access = boilerplate_object->IsJSArray() ? |
HObjectAccess::ForJSArrayOffset(property_offset) : |
HObjectAccess::ForMapAndOffset(boilerplate_map, property_offset); |
- if (boilerplate_object->IsUnboxedDoubleField(field_index)) { |
- CHECK(!boilerplate_object->IsJSArray()); |
- double value = boilerplate_object->RawFastDoublePropertyAt(field_index); |
- access = access.WithRepresentation(Representation::Double()); |
- Add<HStoreNamedField>(object, access, Add<HConstant>(value)); |
- continue; |
- } |
- Handle<Object> value(boilerplate_object->RawFastPropertyAt(field_index), |
- isolate()); |
- |
if (value->IsJSObject()) { |
Handle<JSObject> value_object = Handle<JSObject>::cast(value); |
Handle<AllocationSite> current_site = site_context->EnterNewScope(); |