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

Unified Diff: src/mark-compact.cc

Issue 16663009: Deprecate several unchecked accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Hannes Payer. Created 7 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 | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 0501ccf5805a0c752a01c4876895ba2b7863bf53..d319aa27b890bfb373a0d964605eb7df35600540 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1495,15 +1495,13 @@ class MarkCompactMarkingVisitor
FIXED_ARRAY_TYPE) return;
// Make sure this is a RegExp that actually contains code.
- if (re->TypeTagUnchecked() != JSRegExp::IRREGEXP) return;
+ if (re->TypeTag() != JSRegExp::IRREGEXP) return;
- Object* code = re->DataAtUnchecked(JSRegExp::code_index(is_ascii));
+ Object* code = re->DataAt(JSRegExp::code_index(is_ascii));
if (!code->IsSmi() &&
HeapObject::cast(code)->map()->instance_type() == CODE_TYPE) {
// Save a copy that can be reinstated if we need the code again.
- re->SetDataAtUnchecked(JSRegExp::saved_code_index(is_ascii),
- code,
- heap);
+ re->SetDataAt(JSRegExp::saved_code_index(is_ascii), code);
// Saving a copy might create a pointer into compaction candidate
// that was not observed by marker. This might happen if JSRegExp data
@@ -1515,9 +1513,8 @@ class MarkCompactMarkingVisitor
RecordSlot(slot, slot, code);
// Set a number in the 0-255 range to guarantee no smi overflow.
- re->SetDataAtUnchecked(JSRegExp::code_index(is_ascii),
- Smi::FromInt(heap->sweep_generation() & 0xff),
- heap);
+ re->SetDataAt(JSRegExp::code_index(is_ascii),
+ Smi::FromInt(heap->sweep_generation() & 0xff));
} else if (code->IsSmi()) {
int value = Smi::cast(code)->value();
// The regexp has not been compiled yet or there was a compilation error.
@@ -1528,12 +1525,10 @@ class MarkCompactMarkingVisitor
// Check if we should flush now.
if (value == ((heap->sweep_generation() - kRegExpCodeThreshold) & 0xff)) {
- re->SetDataAtUnchecked(JSRegExp::code_index(is_ascii),
- Smi::FromInt(JSRegExp::kUninitializedValue),
- heap);
- re->SetDataAtUnchecked(JSRegExp::saved_code_index(is_ascii),
- Smi::FromInt(JSRegExp::kUninitializedValue),
- heap);
+ re->SetDataAt(JSRegExp::code_index(is_ascii),
+ Smi::FromInt(JSRegExp::kUninitializedValue));
+ re->SetDataAt(JSRegExp::saved_code_index(is_ascii),
+ Smi::FromInt(JSRegExp::kUninitializedValue));
}
}
}
@@ -2448,7 +2443,7 @@ void MarkCompactCollector::ClearNonLiveReferences() {
// This map is used for inobject slack tracking and has been detached
// from SharedFunctionInfo during the mark phase.
// Since it survived the GC, reattach it now.
- map->unchecked_constructor()->shared()->AttachInitialMap(map);
+ JSFunction::cast(map->constructor())->shared()->AttachInitialMap(map);
}
ClearNonLivePrototypeTransitions(map);
@@ -2479,13 +2474,11 @@ void MarkCompactCollector::ClearNonLivePrototypeTransitions(Map* map) {
int proto_index = proto_offset + new_number_of_transitions * step;
int map_index = map_offset + new_number_of_transitions * step;
if (new_number_of_transitions != i) {
- prototype_transitions->set_unchecked(
- heap_,
+ prototype_transitions->set(
proto_index,
prototype,
UPDATE_WRITE_BARRIER);
- prototype_transitions->set_unchecked(
- heap_,
+ prototype_transitions->set(
map_index,
cached_map,
SKIP_WRITE_BARRIER);
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698