Changeset 103023 in webkit for trunk/Source/JavaScriptCore/bytecode
- Timestamp:
- Dec 15, 2011, 9:32:58 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore/bytecode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/PredictedType.cpp
r101729 r103023 129 129 isTop = false; 130 130 131 if (value & PredictDouble) 132 ptr.strcat("Double"); 131 if (value & PredictDoubleReal) 132 ptr.strcat("Doublereal"); 133 else 134 isTop = false; 135 136 if (value & PredictDoubleNaN) 137 ptr.strcat("Doublenan"); 133 138 else 134 139 isTop = false; … … 213 218 if (value.isInt32()) 214 219 return PredictInt32; 215 if (value.isDouble()) 216 return PredictDouble; 220 if (value.isDouble()) { 221 double number = value.asNumber(); 222 if (number == number) 223 return PredictDoubleReal; 224 return PredictDoubleNaN; 225 } 217 226 if (value.isCell()) 218 227 return predictionFromCell(value.asCell()); -
trunk/Source/JavaScriptCore/bytecode/PredictedType.h
r102442 r103023 56 56 static const PredictedType PredictCell = 0x00007fff; // It's definitely a JSCell. 57 57 static const PredictedType PredictInt32 = 0x00008000; // It's definitely an Int32. 58 static const PredictedType PredictDouble = 0x00010000; // It's definitely a Double. 59 static const PredictedType PredictNumber = 0x00018000; // It's either an Int32 or a Double. 60 static const PredictedType PredictBoolean = 0x00020000; // It's definitely a Boolean. 58 static const PredictedType PredictDoubleReal = 0x00010000; // It's definitely a non-NaN double. 59 static const PredictedType PredictDoubleNaN = 0x00020000; // It's definitely a NaN. 60 static const PredictedType PredictDouble = 0x00030000; // It's either a non-NaN or a NaN double. 61 static const PredictedType PredictNumber = 0x00038000; // It's either an Int32 or a Double. 62 static const PredictedType PredictBoolean = 0x00040000; // It's definitely a Boolean. 61 63 static const PredictedType PredictOther = 0x40000000; // It's definitely none of the above. 62 64 static const PredictedType PredictTop = 0x7fffffff; // It can be any of the above. … … 160 162 } 161 163 164 inline bool isDoubleRealPrediction(PredictedType value) 165 { 166 return value == PredictDoubleReal; 167 } 168 162 169 inline bool isDoublePrediction(PredictedType value) 163 170 { 164 return value == PredictDouble;171 return (value & PredictDouble) == value; 165 172 } 166 173
Note:
See TracChangeset
for help on using the changeset viewer.