Changeset 27416 in webkit for trunk/JavaScriptCore/kjs/JSImmediate.h
- Timestamp:
- Nov 3, 2007, 8:37:21 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSImmediate.h
r27149 r27416 156 156 return 0; 157 157 158 // check for data loss from conversion to float 159 // The d == d check is to allow NaN - it does not 160 // compare equal to itself, but we do want to allow it 161 if (floatUnion.asFloat != d && d == d) 162 return 0; 163 164 return tag(floatUnion.asBits, NumberType); 158 // check for data loss from conversion to float. This 159 // unfortunately also rejects NaN, however, it costs more to 160 // do a check that will include NaN than is saved by letting 161 // NaN be an immediate. 162 if (floatUnion.asFloat == d) 163 return tag(floatUnion.asBits, NumberType); 164 165 return 0; 165 166 } 166 167
Note:
See TracChangeset
for help on using the changeset viewer.