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

Unified Diff: src/factory.cc

Issue 2105683006: Remove DoubleRepresentation from globals.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/conversions.h ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 6f103faabf01081532ad2cbfb46b2db309e82a60..85a974a5a3f24548148a4ebb40b670db7fa3c139 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2161,9 +2161,8 @@ static inline int NumberCacheHash(Handle<FixedArray> cache,
if (number->IsSmi()) {
return Handle<Smi>::cast(number)->value() & mask;
} else {
- DoubleRepresentation rep(number->Number());
- return
- (static_cast<int>(rep.bits) ^ static_cast<int>(rep.bits >> 32)) & mask;
+ int64_t bits = bit_cast<int64_t>(number->Number());
+ return (static_cast<int>(bits) ^ static_cast<int>(bits >> 32)) & mask;
}
}
« no previous file with comments | « src/conversions.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698