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

Unified Diff: src/objects-inl.h

Issue 2631123002: [crankshaft][runtime] Initialize uninitialized double fields with hole NaN value instead of 0.0. (Closed)
Patch Set: Addressing comments Created 3 years, 11 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/objects.cc ('k') | src/value-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 1fcfdd7675586de2934facc4f0e11f26dd96bc68..2d8faee9821b36cf5dc8f70b5bc41d2c368d443e 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -746,13 +746,10 @@ bool Object::FilterKey(PropertyFilter filter) {
Handle<Object> Object::NewStorageFor(Isolate* isolate, Handle<Object> object,
Representation representation) {
- if (representation.IsSmi() && object->IsUninitialized(isolate)) {
- return handle(Smi::kZero, isolate);
- }
if (!representation.IsDouble()) return object;
double value;
if (object->IsUninitialized(isolate)) {
- value = 0;
+ value = bit_cast<double>(kHoleNanInt64);
} else if (object->IsMutableHeapNumber()) {
value = HeapNumber::cast(*object)->value();
} else {
« no previous file with comments | « src/objects.cc ('k') | src/value-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698