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

Unified Diff: src/crankshaft/hydrogen.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 | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.h
diff --git a/src/crankshaft/hydrogen.h b/src/crankshaft/hydrogen.h
index 8d32dc6589014c7d8b8e8c90f3a378ad7e6aa994..203c374d25dff78bf0672741ea92b2c991804831 100644
--- a/src/crankshaft/hydrogen.h
+++ b/src/crankshaft/hydrogen.h
@@ -2456,7 +2456,19 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
field_type_(HType::Tagged()),
access_(HObjectAccess::ForMap()),
lookup_type_(NOT_FOUND),
- details_(PropertyDetails::Empty()) {}
+ details_(PropertyDetails::Empty()),
+ store_mode_(STORE_TO_INITIALIZED_ENTRY) {}
+
+ // Ensure the full store is performed.
+ void MarkAsInitializingStore() {
+ DCHECK_EQ(STORE, access_type_);
+ store_mode_ = INITIALIZING_STORE;
+ }
+
+ StoreFieldOrKeyedMode StoreMode() {
+ DCHECK_EQ(STORE, access_type_);
+ return store_mode_;
+ }
// Checkes whether this PropertyAccessInfo can be handled as a monomorphic
// load named. It additionally fills in the fields necessary to generate the
@@ -2572,6 +2584,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
transition_ = handle(target);
number_ = transition_->LastAdded();
details_ = transition_->instance_descriptors()->GetDetails(number_);
+ MarkAsInitializingStore();
}
void NotFound() {
lookup_type_ = NOT_FOUND;
@@ -2618,6 +2631,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder,
Handle<Map> transition_;
int number_;
PropertyDetails details_;
+ StoreFieldOrKeyedMode store_mode_;
};
HValue* BuildMonomorphicAccess(PropertyAccessInfo* info, HValue* object,
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698