Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 4d8a45bb2d58d3066219dfc01d80b03ea64af9c9..02bd1fe8c4176f2dd26f5eab0e7099f38c67248b 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -2026,6 +2026,8 @@ class JSReceiver: public HeapObject { |
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); |
| }; |
| +class AllocationSiteContext; |
|
Hannes Payer (out of office)
2013/10/11 12:55:44
Move this one up to the other forward class declar
mvstanton
2013/10/11 13:41:47
Done.
|
| + |
| // The JSObject describes real heap allocated JavaScript objects with |
| // properties. |
| // Note that the map of JSObject changes during execution to enable inline |
| @@ -2534,8 +2536,13 @@ class JSObject: public JSReceiver { |
| MUST_USE_RESULT MaybeObject* SetObserved(Isolate* isolate); |
| // Copy object. |
| + static Handle<JSObject> Copy(Handle<JSObject> object, |
| + AllocationSiteContext* site_context); |
| static Handle<JSObject> Copy(Handle<JSObject> object); |
| - static Handle<JSObject> DeepCopy(Handle<JSObject> object); |
| + static Handle<JSObject> DeepCopy(Handle<JSObject> object, |
| + AllocationSiteContext* site_context); |
| + static Handle<JSObject> DeepWalk(Handle<JSObject> object, |
| + AllocationSiteContext* site_context); |
| // Casting. |
| static inline JSObject* cast(Object* obj); |
| @@ -7883,6 +7890,10 @@ class AllocationSite: public Struct { |
| inline void Initialize(); |
| + bool HasNestedSites() { |
| + return nested_site()->IsAllocationSite(); |
| + } |
| + |
| ElementsKind GetElementsKind() { |
| ASSERT(!IsLiteralSite()); |
| return static_cast<ElementsKind>(Smi::cast(transition_info())->value()); |
| @@ -7896,7 +7907,7 @@ class AllocationSite: public Struct { |
| // If transition_info is a smi, then it represents an ElementsKind |
| // for a constructed array. Otherwise, it must be a boilerplate |
| // for an array literal |
| - return transition_info()->IsJSArray(); |
| + return transition_info()->IsJSArray() || transition_info()->IsJSObject(); |
|
Hannes Payer (out of office)
2013/10/11 12:55:44
The method name and the description is outdated.
mvstanton
2013/10/11 13:41:47
Updated comment and changed to SitePointsToLiteral
|
| } |
| DECLARE_PRINTER(AllocationSite) |