Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 11b231f1335b3bef0e4c4ca6c293627f12d33c65..38cf7c3d769af351c8c0b64a0720b38e1ed69104 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1065,11 +1065,7 @@ class Object : public MaybeObject { |
return Representation::Smi(); |
} else if (FLAG_track_double_fields && IsHeapNumber()) { |
return Representation::Double(); |
- } else if (FLAG_track_heap_object_fields && !IsUndefined()) { |
- // Don't track undefined as heapobject because it's also used as temporary |
- // value for computed fields that may turn out to be Smi. That combination |
- // will go tagged, so go tagged immediately. |
- // TODO(verwaest): Change once we track computed boilerplate fields. |
+ } else if (FLAG_track_heap_object_fields) { |
ASSERT(IsHeapObject()); |
return Representation::HeapObject(); |
} else { |
@@ -1078,7 +1074,9 @@ class Object : public MaybeObject { |
} |
inline bool FitsRepresentation(Representation representation) { |
- if (FLAG_track_fields && representation.IsSmi()) { |
+ if (FLAG_track_fields && representation.IsNone()) { |
+ return false; |
+ } else if (FLAG_track_fields && representation.IsSmi()) { |
return IsSmi(); |
} else if (FLAG_track_double_fields && representation.IsDouble()) { |
return IsNumber(); |
@@ -1601,6 +1599,12 @@ class JSReceiver: public HeapObject { |
OMIT_EXTENSIBILITY_CHECK |
}; |
+ enum ValueType { |
danno
2013/06/06 07:54:19
A comment about the enum and the purpose of its va
Toon Verwaest
2013/06/06 10:31:41
Done.
|
+ REAL_VALUE, |
+ PLACEHOLDER_VALUE, |
+ FORCE_TAGGED |
+ }; |
+ |
// Casting. |
static inline JSReceiver* cast(Object* obj); |
@@ -1827,7 +1831,8 @@ class JSObject: public JSReceiver { |
Handle<JSObject> object, |
Handle<Name> key, |
Handle<Object> value, |
- PropertyAttributes attributes); |
+ PropertyAttributes attributes, |
+ ValueType value_type = REAL_VALUE); |
static inline Handle<String> ExpectedTransitionKey(Handle<Map> map); |
static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map); |
@@ -1854,7 +1859,8 @@ class JSObject: public JSReceiver { |
MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes( |
Name* key, |
Object* value, |
- PropertyAttributes attributes); |
+ PropertyAttributes attributes, |
+ ValueType value_type = REAL_VALUE); |
// Retrieve a value in a normalized object given a lookup result. |
// Handles the special representation of JS global objects. |
@@ -2216,7 +2222,8 @@ class JSObject: public JSReceiver { |
Name* name, |
Object* value, |
PropertyAttributes attributes, |
- StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED); |
+ StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED, |
+ ValueType value_type = REAL_VALUE); |
// Add a property to a slow-case object. |
MUST_USE_RESULT MaybeObject* AddSlowProperty(Name* name, |
@@ -2230,7 +2237,8 @@ class JSObject: public JSReceiver { |
PropertyAttributes attributes, |
StrictModeFlag strict_mode, |
StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED, |
- ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK); |
+ ExtensibilityCheck extensibility_check = PERFORM_EXTENSIBILITY_CHECK, |
+ ValueType value_type = REAL_VALUE); |
// Convert the object to use the canonical dictionary |
// representation. If the object is expected to have additional properties |