Title: [164281] releases/WebKitGTK/webkit-2.2/Source/_javascript_Core
- Revision
- 164281
- Author
- [email protected]
- Date
- 2014-02-18 03:38:05 -0800 (Tue, 18 Feb 2014)
Log Message
Merge r155466 - SpecType should have SpecInt48AsDouble
https://bugs.webkit.org/show_bug.cgi?id=121065
Reviewed by Oliver Hunt.
* bytecode/SpeculatedType.cpp:
(JSC::dumpSpeculation):
(JSC::speculationToAbbreviatedString):
(JSC::speculationFromValue):
* bytecode/SpeculatedType.h:
(JSC::isInt48AsDoubleSpeculation):
(JSC::isIntegerSpeculation):
(JSC::isDoubleRealSpeculation):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/ChangeLog (164280 => 164281)
--- releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/ChangeLog 2014-02-18 11:10:27 UTC (rev 164280)
+++ releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/ChangeLog 2014-02-18 11:38:05 UTC (rev 164281)
@@ -1,3 +1,19 @@
+2013-09-10 Filip Pizlo <[email protected]>
+
+ SpecType should have SpecInt48AsDouble
+ https://bugs.webkit.org/show_bug.cgi?id=121065
+
+ Reviewed by Oliver Hunt.
+
+ * bytecode/SpeculatedType.cpp:
+ (JSC::dumpSpeculation):
+ (JSC::speculationToAbbreviatedString):
+ (JSC::speculationFromValue):
+ * bytecode/SpeculatedType.h:
+ (JSC::isInt48AsDoubleSpeculation):
+ (JSC::isIntegerSpeculation):
+ (JSC::isDoubleRealSpeculation):
+
2014-01-18 Alberto Garcia <[email protected]>
_javascript_Core uses PLATFORM(MAC) when it means OS(DARWIN)
Modified: releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/bytecode/SpeculatedType.cpp (164280 => 164281)
--- releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/bytecode/SpeculatedType.cpp 2014-02-18 11:10:27 UTC (rev 164280)
+++ releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/bytecode/SpeculatedType.cpp 2014-02-18 11:38:05 UTC (rev 164281)
@@ -161,11 +161,16 @@
if ((value & SpecDouble) == SpecDouble)
myOut.print("Double");
else {
- if (value & SpecDoubleReal)
- myOut.print("Doublereal");
+ if (value & SpecInt48AsDouble)
+ myOut.print("Int48asdouble");
else
isTop = false;
+ if (value & SpecNonIntAsDouble)
+ myOut.print("Nonintasdouble");
+ else
+ isTop = false;
+
if (value & SpecDoubleNaN)
myOut.print("Doublenan");
else
@@ -233,6 +238,8 @@
return "<Cell>";
if (isInt32Speculation(prediction))
return "<Int32>";
+ if (isInt48AsDoubleSpeculation(prediction))
+ return "<Int48AsDouble>";
if (isDoubleSpeculation(prediction))
return "<Double>";
if (isNumberSpeculation(prediction))
@@ -331,8 +338,14 @@
return SpecInt32;
if (value.isDouble()) {
double number = value.asNumber();
- if (number == number)
+ if (number == number) {
+ int64_t asInt64 = static_cast<int64_t>(number);
+ if (asInt64 == number && (!asInt64 || std::signbit(number))
+ && asInt64 < (static_cast<int64_t>(1) << 47)
+ && asInt64 >= -(static_cast<int64_t>(1) << 47))
+ return SpecInt48AsDouble;
return SpecDoubleReal;
+ }
return SpecDoubleNaN;
}
if (value.isCell())
Modified: releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/bytecode/SpeculatedType.h (164280 => 164281)
--- releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/bytecode/SpeculatedType.h 2014-02-18 11:10:27 UTC (rev 164280)
+++ releases/WebKitGTK/webkit-2.2/Source/_javascript_Core/bytecode/SpeculatedType.h 2014-02-18 11:38:05 UTC (rev 164281)
@@ -62,17 +62,19 @@
static const SpeculatedType SpecCellOther = 0x00040000; // It's definitely a JSCell but not a subclass of JSObject and definitely not a JSString.
static const SpeculatedType SpecCell = 0x0007ffff; // It's definitely a JSCell.
static const SpeculatedType SpecInt32 = 0x00800000; // It's definitely an Int32.
-static const SpeculatedType SpecDoubleReal = 0x01000000; // It's definitely a non-NaN double.
-static const SpeculatedType SpecDoubleNaN = 0x02000000; // It's definitely a NaN.
-static const SpeculatedType SpecDouble = 0x03000000; // It's either a non-NaN or a NaN double.
-static const SpeculatedType SpecRealNumber = 0x01800000; // It's either an Int32 or a DoubleReal.
-static const SpeculatedType SpecNumber = 0x03800000; // It's either an Int32 or a Double.
-static const SpeculatedType SpecBoolean = 0x04000000; // It's definitely a Boolean.
-static const SpeculatedType SpecOther = 0x08000000; // It's definitely none of the above.
-static const SpeculatedType SpecTop = 0x0fffffff; // It can be any of the above.
-static const SpeculatedType SpecEmpty = 0x10000000; // It's definitely an empty value marker.
-static const SpeculatedType SpecEmptyOrTop = 0x1fffffff; // It can be any of the above.
-static const SpeculatedType FixedIndexedStorageMask = SpecInt8Array | SpecInt16Array | SpecInt32Array | SpecUint8Array | SpecUint8ClampedArray | SpecUint16Array | SpecUint32Array | SpecFloat32Array | SpecFloat64Array;
+static const SpeculatedType SpecInt48AsDouble = 0x01000000; // It's definitely an Int48 and it's inside a double.
+static const SpeculatedType SpecInteger = 0x01800000; // It's definitely some kind of integer.
+static const SpeculatedType SpecNonIntAsDouble = 0x02000000; // It's definitely not an Int48 but it's a real number and it's a double.
+static const SpeculatedType SpecDoubleReal = 0x03000000; // It's definitely a non-NaN double.
+static const SpeculatedType SpecDoubleNaN = 0x04000000; // It's definitely a NaN.
+static const SpeculatedType SpecDouble = 0x07000000; // It's either a non-NaN or a NaN double.
+static const SpeculatedType SpecRealNumber = 0x03800000; // It's either an Int32 or a DoubleReal.
+static const SpeculatedType SpecNumber = 0x07800000; // It's either an Int32 or a Double.
+static const SpeculatedType SpecBoolean = 0x08000000; // It's definitely a Boolean.
+static const SpeculatedType SpecOther = 0x10000000; // It's definitely none of the above.
+static const SpeculatedType SpecTop = 0x1fffffff; // It can be any of the above.
+static const SpeculatedType SpecEmpty = 0x20000000; // It's definitely an empty value marker.
+static const SpeculatedType SpecEmptyOrTop = 0x3fffffff; // It can be any of the above.
typedef bool (*SpeculatedTypeChecker)(SpeculatedType);
@@ -107,11 +109,6 @@
return !!(value & (SpecFinalObject | SpecOther)) && !(value & ~(SpecFinalObject | SpecOther));
}
-inline bool isFixedIndexedStorageObjectSpeculation(SpeculatedType value)
-{
- return !!value && (value & FixedIndexedStorageMask) == value;
-}
-
inline bool isStringIdentSpeculation(SpeculatedType value)
{
return value == SpecStringIdent;
@@ -248,9 +245,19 @@
return isInt32Speculation(value & ~SpecOther);
}
+inline bool isInt48AsDoubleSpeculation(SpeculatedType value)
+{
+ return value == SpecInt48AsDouble;
+}
+
+inline bool isIntegerSpeculation(SpeculatedType value)
+{
+ return !!value && (value & SpecInteger) == value;
+}
+
inline bool isDoubleRealSpeculation(SpeculatedType value)
{
- return value == SpecDoubleReal;
+ return !!value && (value & SpecDoubleReal) == value;
}
inline bool isDoubleSpeculation(SpeculatedType value)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes