Revision: 15556
Author:   [email protected]
Date:     Mon Jul  8 08:00:12 2013
Log:      Rename AllocationSite::payload to AllocationSite::transition_info

BUG=
[email protected]

Review URL: https://codereview.chromium.org/18749004
http://code.google.com/p/v8/source/detail?r=15556

Modified:
 /branches/bleeding_edge/src/arm/code-stubs-arm.cc
 /branches/bleeding_edge/src/arm/stub-cache-arm.cc
 /branches/bleeding_edge/src/ast.cc
 /branches/bleeding_edge/src/builtins.cc
 /branches/bleeding_edge/src/code-stubs-hydrogen.cc
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h
 /branches/bleeding_edge/src/hydrogen.cc
 /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
 /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc
 /branches/bleeding_edge/src/objects-inl.h
 /branches/bleeding_edge/src/objects-printer.cc
 /branches/bleeding_edge/src/objects.cc
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/src/x64/code-stubs-x64.cc
 /branches/bleeding_edge/src/x64/stub-cache-x64.cc

=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Mon Jul 8 07:41:54 2013 +++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Mon Jul 8 08:00:12 2013
@@ -6973,7 +6973,7 @@
   // Save the resulting elements kind in type info
   __ SmiTag(r3);
   __ ldr(r5, FieldMemOperand(r2, Cell::kValueOffset));
-  __ str(r3, FieldMemOperand(r5, AllocationSite::kPayloadOffset));
+  __ str(r3, FieldMemOperand(r5, AllocationSite::kTransitionInfoOffset));
   __ SmiUntag(r3);

   __ bind(&normal_sequence);
@@ -7081,7 +7081,7 @@
   __ CompareRoot(r4, Heap::kAllocationSiteMapRootIndex);
   __ b(ne, &no_info);

-  __ ldr(r3, FieldMemOperand(r3, AllocationSite::kPayloadOffset));
+  __ ldr(r3, FieldMemOperand(r3, AllocationSite::kTransitionInfoOffset));
   __ SmiUntag(r3);
   __ jmp(&switch_ready);
   __ bind(&no_info);
=======================================
--- /branches/bleeding_edge/src/arm/stub-cache-arm.cc Mon Jul 8 03:02:16 2013 +++ /branches/bleeding_edge/src/arm/stub-cache-arm.cc Mon Jul 8 08:00:12 2013
@@ -1729,7 +1729,7 @@
   }

   Handle<AllocationSite> site = isolate()->factory()->NewAllocationSite();
-  site->set_payload(Smi::FromInt(GetInitialFastElementsKind()));
+  site->set_transition_info(Smi::FromInt(GetInitialFastElementsKind()));
   Handle<Cell> site_feedback_cell = isolate()->factory()->NewCell(site);
   __ mov(r0, Operand(argc));
   __ mov(r2, Operand(site_feedback_cell));
=======================================
--- /branches/bleeding_edge/src/ast.cc  Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/ast.cc  Mon Jul  8 08:00:12 2013
@@ -678,7 +678,7 @@
     ASSERT(!value->IsTheHole());
     if (value->IsAllocationSite()) {
       AllocationSite* site = AllocationSite::cast(value);
-      elements_kind_ = site->GetElementsKindPayload();
+      elements_kind_ = site->GetElementsKind();
     }
   }
 }
=======================================
--- /branches/bleeding_edge/src/builtins.cc     Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/builtins.cc     Mon Jul  8 08:00:12 2013
@@ -214,7 +214,7 @@
     AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(array);
     if (info != NULL && info->IsValid()) {
       AllocationSite* site = info->GetAllocationSite();
-      ElementsKind to_kind = site->GetElementsKindPayload();
+      ElementsKind to_kind = site->GetElementsKind();
       if (IsMoreGeneralElementsKindTransition(array->GetElementsKind(),
                                               to_kind)) {
         // We have advice that we should change the elements kind
=======================================
--- /branches/bleeding_edge/src/code-stubs-hydrogen.cc Mon Jul 8 03:02:16 2013 +++ /branches/bleeding_edge/src/code-stubs-hydrogen.cc Mon Jul 8 08:00:12 2013
@@ -446,7 +446,7 @@
   HValue* initial_elements_kind = AddInstruction(new(zone) HConstant(
       GetInitialFastElementsKind()));
   AddInstruction(new(zone) HStoreNamedField(object,
-      HObjectAccess::ForAllocationSitePayload(), initial_elements_kind));
+ HObjectAccess::ForAllocationSiteTransitionInfo(), initial_elements_kind));

// We use a hammer (SkipWriteBarrier()) to indicate that we know the input
   // cell is really a Cell, and so no write barrier is needed.
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Jul  8 07:41:33 2013
+++ /branches/bleeding_edge/src/heap.cc Mon Jul  8 08:00:12 2013
@@ -4549,7 +4549,7 @@
   // advice
   Map* initial_map = constructor->initial_map();

-  Smi* smi = Smi::cast(allocation_site->payload());
+  Smi* smi = Smi::cast(allocation_site->transition_info());
   ElementsKind to_kind = static_cast<ElementsKind>(smi->value());
   AllocationSiteMode mode = TRACK_ALLOCATION_SITE;
   if (to_kind != initial_map->elements_kind()) {
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Mon Jul 8 03:02:16 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Mon Jul 8 08:00:12 2013
@@ -5347,8 +5347,8 @@
     return HObjectAccess(kArrayLengths, JSArray::kLengthOffset);
   }

-  static HObjectAccess ForAllocationSitePayload() {
-    return HObjectAccess(kInobject, AllocationSite::kPayloadOffset);
+  static HObjectAccess ForAllocationSiteTransitionInfo() {
+    return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset);
   }

   static HObjectAccess ForFixedArrayLength() {
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/hydrogen.cc     Mon Jul  8 08:00:12 2013
@@ -4650,7 +4650,7 @@
     }

     site = isolate()->factory()->NewAllocationSite();
-    site->set_payload(*raw_boilerplate);
+    site->set_transition_info(*raw_boilerplate);
     literals->set(expr->literal_index(), *site);

     if (JSObject::cast(*raw_boilerplate)->elements()->map() ==
@@ -4660,7 +4660,7 @@
   } else {
     ASSERT(literals_cell->IsAllocationSite());
     site = Handle<AllocationSite>::cast(literals_cell);
-    raw_boilerplate = Handle<Object>(site->payload(), isolate());
+    raw_boilerplate = Handle<Object>(site->transition_info(), isolate());
   }

   ASSERT(!raw_boilerplate.is_null());
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Mon Jul 8 07:41:54 2013 +++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Mon Jul 8 08:00:12 2013
@@ -7522,7 +7522,7 @@

   // Save the resulting elements kind in type info
   __ SmiTag(edx);
-  __ mov(FieldOperand(ecx, AllocationSite::kPayloadOffset), edx);
+  __ mov(FieldOperand(ecx, AllocationSite::kTransitionInfoOffset), edx);
   __ SmiUntag(edx);

   __ bind(&normal_sequence);
@@ -7633,7 +7633,7 @@
       masm->isolate()->heap()->allocation_site_map())));
   __ j(not_equal, &no_info);

-  __ mov(edx, FieldOperand(edx, AllocationSite::kPayloadOffset));
+  __ mov(edx, FieldOperand(edx, AllocationSite::kTransitionInfoOffset));
   __ SmiUntag(edx);
   __ jmp(&switch_ready);
   __ bind(&no_info);
=======================================
--- /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Mon Jul 8 03:02:16 2013 +++ /branches/bleeding_edge/src/ia32/stub-cache-ia32.cc Mon Jul 8 08:00:12 2013
@@ -1725,7 +1725,7 @@
   }

   Handle<AllocationSite> site = isolate()->factory()->NewAllocationSite();
-  site->set_payload(Smi::FromInt(GetInitialFastElementsKind()));
+  site->set_transition_info(Smi::FromInt(GetInitialFastElementsKind()));
   Handle<Cell> site_feedback_cell = isolate()->factory()->NewCell(site);
   __ mov(eax, Immediate(argc));
   __ mov(ebx, site_feedback_cell);
=======================================
--- /branches/bleeding_edge/src/objects-inl.h   Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/objects-inl.h   Mon Jul  8 08:00:12 2013
@@ -4448,7 +4448,7 @@

 ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset)

-ACCESSORS(AllocationSite, payload, Object, kPayloadOffset)
+ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset)
ACCESSORS(AllocationSiteInfo, allocation_site, Object, kAllocationSiteOffset)

 ACCESSORS(Script, source, Object, kSourceOffset)
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc      Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/objects-printer.cc      Mon Jul  8 08:00:12 2013
@@ -1119,9 +1119,9 @@

 void AllocationSite::AllocationSitePrint(FILE* out) {
   HeapObject::PrintHeader(out, "AllocationSite");
-  PrintF(out, " - payload: ");
-  if (payload()->IsCell()) {
-    Cell* cell = Cell::cast(payload());
+  PrintF(out, " - transition_info: ");
+  if (transition_info()->IsCell()) {
+    Cell* cell = Cell::cast(transition_info());
     Object* cell_contents = cell->value();
     if (cell_contents->IsSmi()) {
       ElementsKind kind = static_cast<ElementsKind>(
@@ -1131,15 +1131,15 @@
       PrintF(out, "\n");
       return;
     }
-  } else if (payload()->IsJSArray()) {
+  } else if (transition_info()->IsJSArray()) {
     PrintF(out, "Array literal ");
-    payload()->ShortPrint(out);
+    transition_info()->ShortPrint(out);
     PrintF(out, "\n");
     return;
   }

-  PrintF(out, "unknown payload ");
-  payload()->ShortPrint(out);
+  PrintF(out, "unknown transition_info");
+  transition_info()->ShortPrint(out);
   PrintF(out, "\n");
 }

=======================================
--- /branches/bleeding_edge/src/objects.cc      Mon Jul  8 06:19:58 2013
+++ /branches/bleeding_edge/src/objects.cc      Mon Jul  8 08:00:12 2013
@@ -12316,13 +12316,13 @@
   // Walk through to the Allocation Site
   AllocationSite* site = info->GetAllocationSite();
   if (site->IsLiteralSite()) {
-    JSArray* payload = JSArray::cast(site->payload());
-    ElementsKind kind = payload->GetElementsKind();
+    JSArray* transition_info = JSArray::cast(site->transition_info());
+    ElementsKind kind = transition_info->GetElementsKind();
     if (AllocationSite::GetMode(kind, to_kind) == TRACK_ALLOCATION_SITE) {
       // If the array is huge, it's not likely to be defined in a local
       // function, so we shouldn't make new instances of it very often.
       uint32_t length = 0;
-      CHECK(payload->length()->ToArrayIndex(&length));
+      CHECK(transition_info->length()->ToArrayIndex(&length));
       if (length <= AllocationSite::kMaximumArrayBytesToPretransition) {
         if (FLAG_trace_track_allocation_sites) {
           PrintF(
@@ -12331,11 +12331,11 @@
               ElementsKindToString(kind),
               ElementsKindToString(to_kind));
         }
-        return payload->TransitionElementsKind(to_kind);
+        return transition_info->TransitionElementsKind(to_kind);
       }
     }
   } else {
-    ElementsKind kind = site->GetElementsKindPayload();
+    ElementsKind kind = site->GetElementsKind();
     if (AllocationSite::GetMode(kind, to_kind) == TRACK_ALLOCATION_SITE) {
       if (FLAG_trace_track_allocation_sites) {
         PrintF("AllocationSite: JSArray %p site updated %s->%s\n",
@@ -12343,7 +12343,7 @@
                ElementsKindToString(kind),
                ElementsKindToString(to_kind));
       }
-      site->set_payload(Smi::FromInt(to_kind));
+      site->set_transition_info(Smi::FromInt(to_kind));
     }
   }
   return this;
=======================================
--- /branches/bleeding_edge/src/objects.h       Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/objects.h       Mon Jul  8 08:00:12 2013
@@ -7465,31 +7465,30 @@

 class AllocationSite: public Struct {
  public:
-  static const int kPayloadOffset = HeapObject::kHeaderSize;
-  static const int kSize = kPayloadOffset + kPointerSize;
+  static const int kTransitionInfoOffset = HeapObject::kHeaderSize;
+  static const int kSize = kTransitionInfoOffset + kPointerSize;
   static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;

-  // TODO(mvstanton): rename payload to transition_info.
-  DECL_ACCESSORS(payload, Object)
+  DECL_ACCESSORS(transition_info, Object)

   void Initialize() {
-    SetElementsKindPayload(GetInitialFastElementsKind());
+    SetElementsKind(GetInitialFastElementsKind());
   }

-  ElementsKind GetElementsKindPayload() {
+  ElementsKind GetElementsKind() {
     ASSERT(!IsLiteralSite());
-    return static_cast<ElementsKind>(Smi::cast(payload())->value());
+ return static_cast<ElementsKind>(Smi::cast(transition_info())->value());
   }

-  void SetElementsKindPayload(ElementsKind kind) {
-    set_payload(Smi::FromInt(static_cast<int>(kind)));
+  void SetElementsKind(ElementsKind kind) {
+    set_transition_info(Smi::FromInt(static_cast<int>(kind)));
   }

   bool IsLiteralSite() {
-    // If the payload is a smi, then it represents an ElementsKind
+    // 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 payload()->IsJSArray();
+    return transition_info()->IsJSArray();
   }

   DECLARE_PRINTER(AllocationSite)
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Mon Jul  8 03:02:16 2013
+++ /branches/bleeding_edge/src/runtime.cc      Mon Jul  8 08:00:12 2013
@@ -515,7 +515,7 @@
Runtime::CreateArrayLiteralBoilerplate(isolate, literals, elements);
     if (boilerplate.is_null()) return site;
     site = isolate->factory()->NewAllocationSite();
-    site->set_payload(*boilerplate);
+    site->set_transition_info(*boilerplate);
     literals->set(literals_index, *site);
   } else {
     site = Handle<AllocationSite>::cast(literal_site);
@@ -536,7 +536,7 @@
       literals_index, elements);
   RETURN_IF_EMPTY_HANDLE(isolate, site);

-  JSObject* boilerplate = JSObject::cast(site->payload());
+  JSObject* boilerplate = JSObject::cast(site->transition_info());
   return boilerplate->DeepCopy(isolate);
 }

@@ -552,7 +552,7 @@
       literals_index, elements);
   RETURN_IF_EMPTY_HANDLE(isolate, site);

-  JSObject* boilerplate = JSObject::cast(site->payload());
+  JSObject* boilerplate = JSObject::cast(site->transition_info());
   if (boilerplate->elements()->map() ==
       isolate->heap()->fixed_cow_array_map()) {
     isolate->counters()->cow_arrays_created_runtime()->Increment();
@@ -5221,7 +5221,7 @@
   JSArray* boilerplate = NULL;
   if (raw_literal_cell->IsAllocationSite()) {
     AllocationSite* site = AllocationSite::cast(raw_literal_cell);
-    boilerplate = JSArray::cast(site->payload());
+    boilerplate = JSArray::cast(site->transition_info());
   } else {
     boilerplate = JSArray::cast(raw_literal_cell);
   }
@@ -13845,11 +13845,11 @@
     Handle<AllocationSite> site = Handle<AllocationSite>(
         AllocationSite::cast(cell->value()), isolate);
     ASSERT(!site->IsLiteralSite());
-    ElementsKind to_kind = site->GetElementsKindPayload();
+    ElementsKind to_kind = site->GetElementsKind();
     if (holey && !IsFastHoleyElementsKind(to_kind)) {
       to_kind = GetHoleyElementsKind(to_kind);
       // Update the allocation site info to reflect the advice alteration.
-      site->SetElementsKindPayload(to_kind);
+      site->SetElementsKind(to_kind);
     }

     maybe_array = isolate->heap()->AllocateJSObjectWithAllocationSite(
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Mon Jul 8 07:41:54 2013 +++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Mon Jul 8 08:00:12 2013
@@ -6566,7 +6566,7 @@

   // Save the resulting elements kind in type info
   __ Integer32ToSmi(rdx, rdx);
-  __ movq(FieldOperand(rcx, AllocationSite::kPayloadOffset), rdx);
+  __ movq(FieldOperand(rcx, AllocationSite::kTransitionInfoOffset), rdx);
   __ SmiToInteger32(rdx, rdx);

   __ bind(&normal_sequence);
@@ -6678,7 +6678,7 @@
          Handle<Map>(masm->isolate()->heap()->allocation_site_map()));
   __ j(not_equal, &no_info);

-  __ movq(rdx, FieldOperand(rdx, AllocationSite::kPayloadOffset));
+  __ movq(rdx, FieldOperand(rdx, AllocationSite::kTransitionInfoOffset));
   __ SmiToInteger32(rdx, rdx);
   __ jmp(&switch_ready);
   __ bind(&no_info);
=======================================
--- /branches/bleeding_edge/src/x64/stub-cache-x64.cc Mon Jul 8 03:02:16 2013 +++ /branches/bleeding_edge/src/x64/stub-cache-x64.cc Mon Jul 8 08:00:12 2013
@@ -1642,7 +1642,7 @@
   }

   Handle<AllocationSite> site = isolate()->factory()->NewAllocationSite();
-  site->set_payload(Smi::FromInt(GetInitialFastElementsKind()));
+  site->set_transition_info(Smi::FromInt(GetInitialFastElementsKind()));
   Handle<Cell> site_feedback_cell = isolate()->factory()->NewCell(site);
   __ movq(rax, Immediate(argc));
   __ Move(rbx, site_feedback_cell);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to