The INFINITY macro and 1.0 / 0.0 are not constants in MSVC and need to be corrected for global.Infinity, number.NEGATIVE_INFINITY, and number.POSITIVE_INFINITY.
As shown below:
static const JSCFunctionListEntry js_number_funcs[] = {
- JS_PROP_DOUBLE_DEF("NEGATIVE_INFINITY", -INFINITY, 0 ),
- JS_PROP_DOUBLE_DEF("POSITIVE_INFINITY", INFINITY, 0 ),
+ JS_PROP_U2D_DEF("NEGATIVE_INFINITY", 0xFFF0ull<<48, 0 ), // workaround for msvc
+ JS_PROP_U2D_DEF("POSITIVE_INFINITY", 0x7FF0ull<<48, 0 ), // workaround for msvc
};
static const JSCFunctionListEntry js_global_funcs[] = {
- JS_PROP_DOUBLE_DEF("Infinity", 1.0 / 0.0, 0 ),
+ JS_PROP_U2D_DEF("Infinity", 0x7FF0ull<<48, 0 ), // workaround for msvc
};