Revision: 12813
Author: [email protected]
Date: Thu Oct 25 04:52:37 2012
Log: Get rid of obsolete unchecked accessors.
[email protected]
BUG=v8:1490
Review URL: https://codereview.chromium.org/11271020
http://code.google.com/p/v8/source/detail?r=12813
Modified:
/branches/bleeding_edge/src/compilation-cache.cc
/branches/bleeding_edge/src/elements.cc
/branches/bleeding_edge/src/frames.cc
/branches/bleeding_edge/src/heap-inl.h
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/json-parser.h
/branches/bleeding_edge/src/objects-inl.h
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/src/profile-generator.cc
/branches/bleeding_edge/src/serialize.cc
/branches/bleeding_edge/src/stub-cache.cc
=======================================
--- /branches/bleeding_edge/src/compilation-cache.cc Tue Aug 28 03:49:23
2012
+++ /branches/bleeding_edge/src/compilation-cache.cc Thu Oct 25 04:52:37
2012
@@ -98,7 +98,7 @@
void CompilationSubCache::IterateFunctions(ObjectVisitor* v) {
- Object* undefined = isolate()->heap()->raw_unchecked_undefined_value();
+ Object* undefined = isolate()->heap()->undefined_value();
for (int i = 0; i < generations_; i++) {
if (tables_[i] != undefined) {
reinterpret_cast<CompilationCacheTable*>(tables_[i])->IterateElements(v);
=======================================
--- /branches/bleeding_edge/src/elements.cc Mon Oct 15 08:23:22 2012
+++ /branches/bleeding_edge/src/elements.cc Thu Oct 25 04:52:37 2012
@@ -503,8 +503,8 @@
Map* map = fixed_array_base->map();
// Arrays that have been shifted in place can't be verified.
Heap* heap = holder->GetHeap();
- if (map == heap->raw_unchecked_one_pointer_filler_map() ||
- map == heap->raw_unchecked_two_pointer_filler_map() ||
+ if (map == heap->one_pointer_filler_map() ||
+ map == heap->two_pointer_filler_map() ||
map == heap->free_space_map()) {
return;
}
=======================================
--- /branches/bleeding_edge/src/frames.cc Mon Aug 6 07:13:09 2012
+++ /branches/bleeding_edge/src/frames.cc Thu Oct 25 04:52:37 2012
@@ -484,7 +484,7 @@
Code* EntryFrame::unchecked_code() const {
- return HEAP->raw_unchecked_js_entry_code();
+ return HEAP->js_entry_code();
}
@@ -507,7 +507,7 @@
Code* EntryConstructFrame::unchecked_code() const {
- return HEAP->raw_unchecked_js_construct_entry_code();
+ return HEAP->js_construct_entry_code();
}
=======================================
--- /branches/bleeding_edge/src/heap-inl.h Thu Oct 18 08:08:11 2012
+++ /branches/bleeding_edge/src/heap-inl.h Thu Oct 25 04:52:37 2012
@@ -607,7 +607,7 @@
Object* obj = Object::cast(new_space_strings_[i]);
// TODO(yangguo): check that the object is indeed an external string.
ASSERT(heap_->InNewSpace(obj));
- ASSERT(obj != HEAP->raw_unchecked_the_hole_value());
+ ASSERT(obj != HEAP->the_hole_value());
if (obj->IsExternalAsciiString()) {
ExternalAsciiString* string = ExternalAsciiString::cast(obj);
ASSERT(String::IsAscii(string->GetChars(), string->length()));
@@ -617,7 +617,7 @@
Object* obj = Object::cast(old_space_strings_[i]);
// TODO(yangguo): check that the object is indeed an external string.
ASSERT(!heap_->InNewSpace(obj));
- ASSERT(obj != HEAP->raw_unchecked_the_hole_value());
+ ASSERT(obj != HEAP->the_hole_value());
if (obj->IsExternalAsciiString()) {
ExternalAsciiString* string = ExternalAsciiString::cast(obj);
ASSERT(String::IsAscii(string->GetChars(), string->length()));
=======================================
--- /branches/bleeding_edge/src/heap.cc Tue Oct 23 01:25:04 2012
+++ /branches/bleeding_edge/src/heap.cc Thu Oct 25 04:52:37 2012
@@ -7206,7 +7206,7 @@
void ExternalStringTable::CleanUp() {
int last = 0;
for (int i = 0; i < new_space_strings_.length(); ++i) {
- if (new_space_strings_[i] == heap_->raw_unchecked_the_hole_value()) {
+ if (new_space_strings_[i] == heap_->the_hole_value()) {
continue;
}
if (heap_->InNewSpace(new_space_strings_[i])) {
@@ -7218,7 +7218,7 @@
new_space_strings_.Rewind(last);
last = 0;
for (int i = 0; i < old_space_strings_.length(); ++i) {
- if (old_space_strings_[i] == heap_->raw_unchecked_the_hole_value()) {
+ if (old_space_strings_[i] == heap_->the_hole_value()) {
continue;
}
ASSERT(!heap_->InNewSpace(old_space_strings_[i]));
=======================================
--- /branches/bleeding_edge/src/json-parser.h Tue Oct 23 01:06:28 2012
+++ /branches/bleeding_edge/src/json-parser.h Thu Oct 25 04:52:37 2012
@@ -628,11 +628,11 @@
uint32_t count = 1;
while (true) {
Object* element = symbol_table->KeyAt(entry);
- if (element == isolate()->heap()->raw_unchecked_undefined_value()) {
+ if (element == isolate()->heap()->undefined_value()) {
// Lookup failure.
break;
}
- if (element != isolate()->heap()->raw_unchecked_the_hole_value() &&
+ if (element != isolate()->heap()->the_hole_value() &&
String::cast(element)->IsAsciiEqualTo(string_vector)) {
// Lookup success, update the current position.
position_ = position;
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Mon Oct 22 03:38:40 2012
+++ /branches/bleeding_edge/src/objects-inl.h Thu Oct 25 04:52:37 2012
@@ -660,8 +660,8 @@
bool Object::IsSymbolTable() {
- return IsHashTable() && this ==
- HeapObject::cast(this)->GetHeap()->raw_unchecked_symbol_table();
+ return IsHashTable() &&
+ this ==
HeapObject::cast(this)->GetHeap()->raw_unchecked_symbol_table();
}
@@ -1850,7 +1850,7 @@
void FixedArray::NoIncrementalWriteBarrierSet(FixedArray* array,
int index,
Object* value) {
- ASSERT(array->map() != HEAP->raw_unchecked_fixed_cow_array_map());
+ ASSERT(array->map() != HEAP->fixed_cow_array_map());
ASSERT(index >= 0 && index < array->length());
int offset = kHeaderSize + index * kPointerSize;
WRITE_FIELD(array, offset, value);
@@ -1864,7 +1864,7 @@
void FixedArray::NoWriteBarrierSet(FixedArray* array,
int index,
Object* value) {
- ASSERT(array->map() != HEAP->raw_unchecked_fixed_cow_array_map());
+ ASSERT(array->map() != HEAP->fixed_cow_array_map());
ASSERT(index >= 0 && index < array->length());
ASSERT(!HEAP->InNewSpace(value));
WRITE_FIELD(array, kHeaderSize + index * kPointerSize, value);
@@ -2291,8 +2291,8 @@
while (true) {
Object* element = KeyAt(entry);
// Empty entry.
- if (element == isolate->heap()->raw_unchecked_undefined_value()) break;
- if (element != isolate->heap()->raw_unchecked_the_hole_value() &&
+ if (element == isolate->heap()->undefined_value()) break;
+ if (element != isolate->heap()->the_hole_value() &&
Shape::IsMatch(key, element)) return entry;
entry = NextProbe(entry, count++, capacity);
}
@@ -5252,8 +5252,8 @@
// Please note this function is used during marking:
// - MarkCompactCollector::MarkUnmarkedObject
// - IncrementalMarking::Step
- ASSERT(!heap->InNewSpace(heap->raw_unchecked_empty_fixed_array()));
- WRITE_FIELD(this, kCodeCacheOffset,
heap->raw_unchecked_empty_fixed_array());
+ ASSERT(!heap->InNewSpace(heap->empty_fixed_array()));
+ WRITE_FIELD(this, kCodeCacheOffset, heap->empty_fixed_array());
}
@@ -5347,7 +5347,7 @@
Object* TypeFeedbackCells::RawUninitializedSentinel(Heap* heap) {
- return heap->raw_unchecked_the_hole_value();
+ return heap->the_hole_value();
}
=======================================
--- /branches/bleeding_edge/src/objects.cc Mon Oct 22 05:50:51 2012
+++ /branches/bleeding_edge/src/objects.cc Thu Oct 25 04:52:37 2012
@@ -8105,7 +8105,7 @@
// constructor is called. The countdown will continue and (possibly after
// several more GCs) CompleteInobjectSlackTracking will eventually be
called.
Heap* heap = map->GetHeap();
- set_initial_map(heap->raw_unchecked_undefined_value());
+ set_initial_map(heap->undefined_value());
Builtins* builtins = heap->isolate()->builtins();
ASSERT_EQ(builtins->builtin(Builtins::kJSConstructStubCountdown),
*RawField(this, kConstructStubOffset));
=======================================
--- /branches/bleeding_edge/src/profile-generator.cc Wed Oct 17 06:04:49
2012
+++ /branches/bleeding_edge/src/profile-generator.cc Thu Oct 25 04:52:37
2012
@@ -2443,19 +2443,17 @@
bool V8HeapExplorer::IsEssentialObject(Object* object) {
- // We have to use raw_unchecked_* versions because checked versions
- // would fail during iteration over object properties.
return object->IsHeapObject()
&& !object->IsOddball()
- && object != heap_->raw_unchecked_empty_byte_array()
- && object != heap_->raw_unchecked_empty_fixed_array()
- && object != heap_->raw_unchecked_empty_descriptor_array()
- && object != heap_->raw_unchecked_fixed_array_map()
- && object != heap_->raw_unchecked_global_property_cell_map()
- && object != heap_->raw_unchecked_shared_function_info_map()
- && object != heap_->raw_unchecked_free_space_map()
- && object != heap_->raw_unchecked_one_pointer_filler_map()
- && object != heap_->raw_unchecked_two_pointer_filler_map();
+ && object != heap_->empty_byte_array()
+ && object != heap_->empty_fixed_array()
+ && object != heap_->empty_descriptor_array()
+ && object != heap_->fixed_array_map()
+ && object != heap_->global_property_cell_map()
+ && object != heap_->shared_function_info_map()
+ && object != heap_->free_space_map()
+ && object != heap_->one_pointer_filler_map()
+ && object != heap_->two_pointer_filler_map();
}
=======================================
--- /branches/bleeding_edge/src/serialize.cc Fri Sep 14 06:19:42 2012
+++ /branches/bleeding_edge/src/serialize.cc Thu Oct 25 04:52:37 2012
@@ -1297,7 +1297,7 @@
// The code-caches link to context-specific code objects, which
// the startup and context serializes cannot currently handle.
ASSERT(Map::cast(heap_object)->code_cache() ==
- heap_object->GetHeap()->raw_unchecked_empty_fixed_array());
+ heap_object->GetHeap()->empty_fixed_array());
}
int root_index;
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc Mon Sep 10 06:38:21 2012
+++ /branches/bleeding_edge/src/stub-cache.cc Thu Oct 25 04:52:37 2012
@@ -747,10 +747,8 @@
CallICBase::Contextual::encode(mode ==
RelocInfo::CODE_TARGET_CONTEXT);
Code::Flags flags =
Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL,
argc);
-
- // Use raw_unchecked... so we don't get assert failures during GC.
UnseededNumberDictionary* dictionary =
- isolate()->heap()->raw_unchecked_non_monomorphic_cache();
+ isolate()->heap()->non_monomorphic_cache();
int entry = dictionary->FindEntry(isolate(), flags);
ASSERT(entry != -1);
Object* code = dictionary->ValueAt(entry);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev