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

Unified Diff: src/transitions-inl.h

Issue 1194673002: Revert of Replace ad-hoc weakness in transition array with WeakCell. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions-inl.h
diff --git a/src/transitions-inl.h b/src/transitions-inl.h
index 870c8e7c0696a58400173c4dd056c34baca2e42e..f31eff96ba19e6e8e1dca0f1a4b3ee0c7c654a53 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -47,12 +47,6 @@
}
-Object** TransitionArray::GetTargetSlot(int transition_number) {
- DCHECK(transition_number < number_of_transitions());
- return RawFieldOfElementAt(ToTargetIndex(transition_number));
-}
-
-
Name* TransitionArray::GetKey(int transition_number) {
DCHECK(transition_number < number_of_transitions());
return Name::cast(get(ToKeyIndex(transition_number)));
@@ -77,8 +71,7 @@
Map* TransitionArray::GetTarget(int transition_number) {
DCHECK(transition_number < number_of_transitions());
- WeakCell* cell = GetTargetCell(transition_number);
- return Map::cast(cell->value());
+ return Map::cast(get(ToTargetIndex(transition_number)));
}
@@ -93,13 +86,7 @@
}
-WeakCell* TransitionArray::GetTargetCell(int transition_number) {
- DCHECK(transition_number < number_of_transitions());
- return WeakCell::cast(get(ToTargetIndex(transition_number)));
-}
-
-
-void TransitionArray::SetTargetCell(int transition_number, WeakCell* value) {
+void TransitionArray::SetTarget(int transition_number, Map* value) {
DCHECK(transition_number < number_of_transitions());
set(ToTargetIndex(transition_number), value);
}
@@ -171,9 +158,13 @@
}
-void TransitionArray::Set(int transition_number, Name* key, WeakCell* target) {
- set(ToKeyIndex(transition_number), key);
- set(ToTargetIndex(transition_number), target);
+void TransitionArray::NoIncrementalWriteBarrierSet(int transition_number,
+ Name* key,
+ Map* target) {
+ FixedArray::NoIncrementalWriteBarrierSet(
+ this, ToKeyIndex(transition_number), key);
+ FixedArray::NoIncrementalWriteBarrierSet(
+ this, ToTargetIndex(transition_number), target);
}
« no previous file with comments | « src/transitions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698