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

Unified Diff: src/conversions.h

Issue 556563005: Fix Smi vs. HeapObject confusion in HConstants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/conversions.h
diff --git a/src/conversions.h b/src/conversions.h
index c33de77cd1f45f83f3197557a03aaab6f7f84a40..1b76ac5b67606310acea32ccfb6120d58416b469 100644
--- a/src/conversions.h
+++ b/src/conversions.h
@@ -153,6 +153,12 @@ static inline bool IsMinusZero(double value) {
}
+static inline bool IsSmiDouble(double value) {
+ return !IsMinusZero(value) && value >= Smi::kMinValue &&
+ value <= Smi::kMaxValue && value == FastI2D(FastD2I(value));
+}
+
+
// Integer32 is an integer that can be represented as a signed 32-bit
// integer. It has to be in the range [-2^31, 2^31 - 1].
// We also have to check for negative 0 as it is not an Integer32.
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698