Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: src/hydrogen-instructions.h

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment response Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 0cd2f874259ad72e95094822bf3515c0d33bbdc8..22de75b19390c7300f4324722dd9adcc127834ee 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5347,6 +5347,10 @@ class HObjectAccess {
return HObjectAccess(kArrayLengths, JSArray::kLengthOffset);
}
+ static HObjectAccess ForAllocationSitePayload() {
+ return HObjectAccess(kInobject, AllocationSite::kPayloadOffset);
+ }
+
static HObjectAccess ForFixedArrayLength() {
return HObjectAccess(kArrayLengths, FixedArray::kLengthOffset);
}
@@ -5363,8 +5367,16 @@ class HObjectAccess {
return HObjectAccess(kMaps, JSObject::kMapOffset);
}
- static HObjectAccess ForAllocationSitePayload() {
- return HObjectAccess(kInobject, AllocationSiteInfo::kPayloadOffset);
+ static HObjectAccess ForPropertyCellValue() {
+ return HObjectAccess(kInobject, PropertyCell::kValueOffset);
+ }
+
+ static HObjectAccess ForCellValue() {
+ return HObjectAccess(kInobject, Cell::kValueOffset);
+ }
+
+ static HObjectAccess ForAllocationSiteInfoSite() {
+ return HObjectAccess(kInobject, AllocationSiteInfo::kAllocationSiteOffset);
}
// Create an access to an offset in a fixed array header.
@@ -5792,7 +5804,8 @@ class HStoreNamedField: public HTemplateInstruction<2> {
field_representation_(field_representation),
transition_(),
transition_unique_id_(),
- new_space_dominator_(NULL) {
+ new_space_dominator_(NULL),
+ write_barrier_mode_(UPDATE_WRITE_BARRIER) {
SetOperandAt(0, obj);
SetOperandAt(1, val);
access.SetGVNFlags(this, true);
@@ -5817,6 +5830,11 @@ class HStoreNamedField: public HTemplateInstruction<2> {
}
virtual void PrintDataTo(StringStream* stream);
+ void SkipWriteBarrier() { write_barrier_mode_ = SKIP_WRITE_BARRIER; }
+ bool IsSkipWriteBarrier() const {
+ return write_barrier_mode_ == SKIP_WRITE_BARRIER;
+ }
+
HValue* object() { return OperandAt(0); }
HValue* value() { return OperandAt(1); }
@@ -5835,6 +5853,7 @@ class HStoreNamedField: public HTemplateInstruction<2> {
bool NeedsWriteBarrier() {
ASSERT(!(FLAG_track_double_fields && field_representation_.IsDouble()) ||
transition_.is_null());
+ if (IsSkipWriteBarrier()) return false;
return (!FLAG_track_fields || !field_representation_.IsSmi()) &&
// If there is a transition, a new storage object needs to be allocated.
!(FLAG_track_double_fields && field_representation_.IsDouble()) &&
@@ -5843,6 +5862,7 @@ class HStoreNamedField: public HTemplateInstruction<2> {
}
bool NeedsWriteBarrierForMap() {
+ if (IsSkipWriteBarrier()) return false;
return ReceiverObjectNeedsWriteBarrier(object(), new_space_dominator());
}
@@ -5860,6 +5880,7 @@ class HStoreNamedField: public HTemplateInstruction<2> {
Handle<Map> transition_;
UniqueValueId transition_unique_id_;
HValue* new_space_dominator_;
+ WriteBarrierMode write_barrier_mode_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698