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

Unified Diff: src/snapshot/deserializer.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/s390/macro-assembler-s390.cc ('k') | src/snapshot/serializer-common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/deserializer.cc
diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc
index 7a22a15f54f45af61e3e798ecf9777dc29fe20e5..b90a2c5b105ca7ffe320bf2f0369b5fc295aa8dc 100644
--- a/src/snapshot/deserializer.cc
+++ b/src/snapshot/deserializer.cc
@@ -99,7 +99,7 @@ void Deserializer::Deserialize(Isolate* isolate) {
isolate_->heap()->undefined_value());
// The allocation site list is build during root iteration, but if no sites
// were encountered then it needs to be initialized to undefined.
- if (isolate_->heap()->allocation_sites_list() == Smi::kZero) {
+ if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) {
isolate_->heap()->set_allocation_sites_list(
isolate_->heap()->undefined_value());
}
@@ -277,7 +277,7 @@ HeapObject* Deserializer::PostProcessNewObject(HeapObject* obj, int space) {
// TODO(mvstanton): consider treating the heap()->allocation_sites_list()
// as a (weak) root. If this root is relocated correctly, this becomes
// unnecessary.
- if (isolate_->heap()->allocation_sites_list() == Smi::kZero) {
+ if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) {
site->set_weak_next(isolate_->heap()->undefined_value());
} else {
site->set_weak_next(isolate_->heap()->allocation_sites_list());
« no previous file with comments | « src/s390/macro-assembler-s390.cc ('k') | src/snapshot/serializer-common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698