20814N/A+// Simulate x86 overflow behavior
20814N/A+struct ConvertImpl<JSUint64, jsdouble> {
20814N/A+ static JS_ALWAYS_INLINE JSUint64 Convert(jsdouble d) {
20814N/A+ return d >= 0xffffffffffffffff ?
20814N/A+ 0x8000000000000000 : JSUint64(d);
20814N/A+struct ConvertImpl<JSInt64, jsdouble> {
20814N/A+ static JS_ALWAYS_INLINE JSInt64 Convert(jsdouble d) {
20814N/A+ return d >= 0x7fffffffffffffff ?
20814N/A+ 0x8000000000000000 : JSInt64(d);
20814N/A template<class TargetType, class FromType>
20814N/A static JS_ALWAYS_INLINE TargetType Convert(FromType d)