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

Unified Diff: src/transitions.cc

Issue 10908237: Moving the WhitenessWitness back to DescriptorArray. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Another NoIncrementalWriteBarrierSet. Created 8 years, 3 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/transitions.h ('k') | src/transitions-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions.cc
diff --git a/src/transitions.cc b/src/transitions.cc
index 0ea58c7d5f530164611c5292658ac6a91d275bc0..199fcc2c9838fb0691bbedd4c00e1dd7bd27bb3e 100644
--- a/src/transitions.cc
+++ b/src/transitions.cc
@@ -58,14 +58,12 @@ MaybeObject* TransitionArray::Allocate(int number_of_transitions,
}
-void TransitionArray::CopyFrom(TransitionArray* origin,
- int origin_transition,
- int target_transition,
- const WhitenessWitness& witness) {
- Set(target_transition,
- origin->GetKey(origin_transition),
- origin->GetTarget(origin_transition),
- witness);
+void TransitionArray::NoIncrementalWriteBarrierCopyFrom(TransitionArray* origin,
+ int origin_transition,
+ int target_transition) {
+ NoIncrementalWriteBarrierSet(target_transition,
+ origin->GetKey(origin_transition),
+ origin->GetTarget(origin_transition));
}
@@ -84,9 +82,7 @@ MaybeObject* TransitionArray::NewWith(
MaybeObject* maybe_array = TransitionArray::Allocate(1, descriptors_pointer);
if (!maybe_array->To(&result)) return maybe_array;
- FixedArray::WhitenessWitness witness(result);
-
- result->Set(0, name, target, witness);
+ result->NoIncrementalWriteBarrierSet(0, name, target);
result->set_back_pointer_storage(back_pointer);
return result;
}
@@ -113,26 +109,28 @@ MaybeObject* TransitionArray::CopyInsert(String* name, Map* target) {
result->SetPrototypeTransitions(GetPrototypeTransitions());
}
- FixedArray::WhitenessWitness witness(result);
-
if (insertion_index != kNotFound) {
for (int i = 0; i < number_of_transitions; ++i) {
- if (i != insertion_index) result->CopyFrom(this, i, i, witness);
+ if (i != insertion_index) {
+ result->NoIncrementalWriteBarrierCopyFrom(this, i, i);
+ }
}
- result->Set(insertion_index, name, target, witness);
+ result->NoIncrementalWriteBarrierSet(insertion_index, name, target);
return result;
}
insertion_index = 0;
for (; insertion_index < number_of_transitions; ++insertion_index) {
if (InsertionPointFound(GetKey(insertion_index), name)) break;
- result->CopyFrom(this, insertion_index, insertion_index, witness);
+ result->NoIncrementalWriteBarrierCopyFrom(
+ this, insertion_index, insertion_index);
}
- result->Set(insertion_index, name, target, witness);
+ result->NoIncrementalWriteBarrierSet(insertion_index, name, target);
for (; insertion_index < number_of_transitions; ++insertion_index) {
- result->CopyFrom(this, insertion_index, insertion_index + 1, witness);
+ result->NoIncrementalWriteBarrierCopyFrom(
+ this, insertion_index, insertion_index + 1);
}
result->set_back_pointer_storage(back_pointer_storage());
« no previous file with comments | « src/transitions.h ('k') | src/transitions-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698