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

Unified Diff: src/heap/spaces.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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/heap/mark-compact.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/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 46f4bf225d5d6ed925dc6a9f91ec4e95156ad930..1b25f404458352d5579b427993f22daf1c304c6b 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -1277,7 +1277,7 @@ Object* PagedSpace::FindObject(Address addr) {
// Note: this function can only be called on iterable spaces.
DCHECK(!heap()->mark_compact_collector()->in_use());
- if (!Contains(addr)) return Smi::kZero; // Signaling not found.
+ if (!Contains(addr)) return Smi::FromInt(0); // Signaling not found.
Page* p = Page::FromAddress(addr);
HeapObjectIterator it(p);
@@ -1288,7 +1288,7 @@ Object* PagedSpace::FindObject(Address addr) {
}
UNREACHABLE();
- return Smi::kZero;
+ return Smi::FromInt(0);
}
void PagedSpace::ShrinkImmortalImmovablePages() {
@@ -2995,7 +2995,7 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
// We only need to do this in debug builds or if verify_heap is on.
reinterpret_cast<Object**>(object->address())[0] =
heap()->fixed_array_map();
- reinterpret_cast<Object**>(object->address())[1] = Smi::kZero;
+ reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0);
}
heap()->StartIncrementalMarkingIfAllocationLimitIsReached(Heap::kNoGCFlags,
@@ -3024,7 +3024,7 @@ Object* LargeObjectSpace::FindObject(Address a) {
if (page != NULL) {
return page->GetObject();
}
- return Smi::kZero; // Signaling not found.
+ return Smi::FromInt(0); // Signaling not found.
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698