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

Unified Diff: src/heap/incremental-marking.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/heap-inl.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index 30129c5d458d7206cab3ef05c24fb088e3ea369b..579228c2dce71ff261f47032bc6a3460e6c0b6f7 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -628,9 +628,9 @@ void IncrementalMarking::ProcessWeakCells() {
Object* the_hole_value = heap()->the_hole_value();
Object* weak_cell_obj = heap()->encountered_weak_cells();
- Object* weak_cell_head = Smi::kZero;
+ Object* weak_cell_head = Smi::FromInt(0);
WeakCell* prev_weak_cell_obj = NULL;
- while (weak_cell_obj != Smi::kZero) {
+ while (weak_cell_obj != Smi::FromInt(0)) {
WeakCell* weak_cell = reinterpret_cast<WeakCell*>(weak_cell_obj);
// We do not insert cleared weak cells into the list, so the value
// cannot be a Smi here.
@@ -648,7 +648,7 @@ void IncrementalMarking::ProcessWeakCells() {
weak_cell_obj = weak_cell->next();
weak_cell->clear_next(the_hole_value);
} else {
- if (weak_cell_head == Smi::kZero) {
+ if (weak_cell_head == Smi::FromInt(0)) {
weak_cell_head = weak_cell;
}
prev_weak_cell_obj = weak_cell;
« no previous file with comments | « src/heap/heap-inl.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698