Revision: 16833
Author: [email protected]
Date: Thu Sep 19 14:13:34 2013 UTC
Log: Added a DependentCode field to AllocationSite. It's not currently
used,
this initial CL is just to get the object layout correct.
BUG=
[email protected], [email protected]
Review URL: https://codereview.chromium.org/23567003
http://code.google.com/p/v8/source/detail?r=16833
Modified:
/branches/bleeding_edge/src/code-stubs-hydrogen.cc
/branches/bleeding_edge/src/heap-snapshot-generator.cc
/branches/bleeding_edge/src/hydrogen-instructions.h
/branches/bleeding_edge/src/objects-inl.h
/branches/bleeding_edge/src/objects-printer.cc
/branches/bleeding_edge/src/objects.h
=======================================
--- /branches/bleeding_edge/src/code-stubs-hydrogen.cc Mon Sep 16 11:30:10
2013 UTC
+++ /branches/bleeding_edge/src/code-stubs-hydrogen.cc Thu Sep 19 14:13:34
2013 UTC
@@ -474,14 +474,22 @@
HObjectAccess::ForAllocationSiteTransitionInfo(),
initial_elements_kind);
+ // Store an empty fixed array for the code dependency.
+ HConstant* empty_fixed_array =
+ Add<HConstant>(isolate()->factory()->empty_fixed_array());
+ HStoreNamedField* store = Add<HStoreNamedField>(
+ object,
+ HObjectAccess::ForAllocationSiteDependentCode(),
+ empty_fixed_array);
+
// Link the object to the allocation site list
HValue* site_list = Add<HConstant>(
ExternalReference::allocation_sites_list_address(isolate()));
HValue* site = Add<HLoadNamedField>(site_list,
HObjectAccess::ForAllocationSiteList());
- HStoreNamedField* store =
- Add<HStoreNamedField>(object,
HObjectAccess::ForAllocationSiteWeakNext(),
- site);
+ store = Add<HStoreNamedField>(object,
+ HObjectAccess::ForAllocationSiteWeakNext(),
+ site);
store->SkipWriteBarrier();
Add<HStoreNamedField>(site_list, HObjectAccess::ForAllocationSiteList(),
object);
=======================================
--- /branches/bleeding_edge/src/heap-snapshot-generator.cc Mon Sep 16
15:19:41 2013 UTC
+++ /branches/bleeding_edge/src/heap-snapshot-generator.cc Thu Sep 19
14:13:34 2013 UTC
@@ -1301,6 +1301,8 @@
AllocationSite* site)
{
SetInternalReference(site, entry, "transition_info",
site->transition_info(),
AllocationSite::kTransitionInfoOffset);
+ SetInternalReference(site, entry, "dependent_code",
site->dependent_code(),
+ AllocationSite::kDependentCodeOffset);
}
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Thu Sep 19 09:07:27
2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Sep 19 14:13:34
2013 UTC
@@ -351,6 +351,7 @@
IMMOVABLE_UNIQUE_VALUE_ID(false_value)
IMMOVABLE_UNIQUE_VALUE_ID(the_hole_value)
IMMOVABLE_UNIQUE_VALUE_ID(empty_string)
+ IMMOVABLE_UNIQUE_VALUE_ID(empty_fixed_array)
#undef IMMOVABLE_UNIQUE_VALUE_ID
@@ -3366,7 +3367,8 @@
unique_id_ == UniqueValueId::true_value(heap) ||
unique_id_ == UniqueValueId::false_value(heap) ||
unique_id_ == UniqueValueId::the_hole_value(heap) ||
- unique_id_ == UniqueValueId::empty_string(heap);
+ unique_id_ == UniqueValueId::empty_string(heap) ||
+ unique_id_ == UniqueValueId::empty_fixed_array(heap);
}
bool IsCell() const {
@@ -5670,6 +5672,10 @@
static HObjectAccess ForAllocationSiteTransitionInfo() {
return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset);
}
+
+ static HObjectAccess ForAllocationSiteDependentCode() {
+ return HObjectAccess(kInobject, AllocationSite::kDependentCodeOffset);
+ }
static HObjectAccess ForAllocationSiteWeakNext() {
return HObjectAccess(kInobject, AllocationSite::kWeakNextOffset);
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Tue Sep 17 11:34:20 2013 UTC
+++ /branches/bleeding_edge/src/objects-inl.h Thu Sep 19 14:13:34 2013 UTC
@@ -1321,6 +1321,13 @@
}
return false;
}
+
+
+void AllocationSite::Initialize() {
+ SetElementsKind(GetInitialFastElementsKind());
+ set_dependent_code(DependentCode::cast(GetHeap()->empty_fixed_array()),
+ SKIP_WRITE_BARRIER);
+}
// Heuristic: We only need to create allocation site info if the
boilerplate
@@ -4480,6 +4487,8 @@
ACCESSORS(TypeSwitchInfo, types, Object, kTypesOffset)
ACCESSORS(AllocationSite, transition_info, Object, kTransitionInfoOffset)
+ACCESSORS(AllocationSite, dependent_code, DependentCode,
+ kDependentCodeOffset)
ACCESSORS(AllocationSite, weak_next, Object, kWeakNextOffset)
ACCESSORS(AllocationMemento, allocation_site, Object,
kAllocationSiteOffset)
=======================================
--- /branches/bleeding_edge/src/objects-printer.cc Wed Sep 4 07:45:36 2013
UTC
+++ /branches/bleeding_edge/src/objects-printer.cc Thu Sep 19 14:13:34 2013
UTC
@@ -1100,9 +1100,10 @@
HeapObject::PrintHeader(out, "AllocationSite");
PrintF(out, " - weak_next: ");
weak_next()->ShortPrint(out);
- PrintF(out, "\n");
+ PrintF(out, "\n - dependent code: ");
+ dependent_code()->ShortPrint(out);
- PrintF(out, " - transition_info: ");
+ PrintF(out, "\n - transition_info: ");
if (transition_info()->IsCell()) {
Cell* cell = Cell::cast(transition_info());
Object* cell_contents = cell->value();
=======================================
--- /branches/bleeding_edge/src/objects.h Wed Sep 18 16:41:12 2013 UTC
+++ /branches/bleeding_edge/src/objects.h Thu Sep 19 14:13:34 2013 UTC
@@ -7837,11 +7837,10 @@
static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
DECL_ACCESSORS(transition_info, Object)
+ DECL_ACCESSORS(dependent_code, DependentCode)
DECL_ACCESSORS(weak_next, Object)
- void Initialize() {
- SetElementsKind(GetInitialFastElementsKind());
- }
+ inline void Initialize();
ElementsKind GetElementsKind() {
ASSERT(!IsLiteralSite());
@@ -7869,11 +7868,12 @@
static inline bool CanTrack(InstanceType type);
static const int kTransitionInfoOffset = HeapObject::kHeaderSize;
- static const int kWeakNextOffset = kTransitionInfoOffset + kPointerSize;
+ static const int kDependentCodeOffset = kTransitionInfoOffset +
kPointerSize;
+ static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize;
static const int kSize = kWeakNextOffset + kPointerSize;
typedef FixedBodyDescriptor<HeapObject::kHeaderSize,
- kTransitionInfoOffset + kPointerSize,
+ kDependentCodeOffset + kPointerSize,
kSize> BodyDescriptor;
private:
--
--
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.