diff --git a/meson.build b/meson.build index 99563bee..3219f7e0 100644 --- a/meson.build +++ b/meson.build @@ -100,6 +100,7 @@ if host_machine.system() == 'windows' deps += cc.find_library('cfgmgr32') deps += cc.find_library('bcrypt') sdl3_opts.add_cmake_defines({'HAVE_ISINF': '1'}) # Hack for MSYS2 + sdl3_opts.add_cmake_defines({'HAVE_ISNAN': '1'}) link += '-static' endif diff --git a/scripts/core/base.js b/scripts/core/base.js index 8a9a69a3..072b16b8 100644 --- a/scripts/core/base.js +++ b/scripts/core/base.js @@ -625,13 +625,6 @@ debug or serialization. Implementation details may vary. :return: A quoted version of the string. `; -(String.prototype.localeCompare)[prosperon.DOC] = `Return a number indicating whether this string is less than, equal to, or -greater than 'compareString' in sort order, according to the current locale. - -:param compareString: The string to compare against. -:return: A negative number if less, 0 if the same, or a positive number if greater. -`; - (String.prototype.toLowerCase)[prosperon.DOC] = `Return a new string with all alphabetic characters converted to lowercase. :return: The lowercase version of this string. diff --git a/scripts/modules/sdl_render.js b/scripts/modules/sdl_render.js index 2ea619bc..ef3fe855 100644 --- a/scripts/modules/sdl_render.js +++ b/scripts/modules/sdl_render.js @@ -29,7 +29,6 @@ render.initialize = function(config) } prosperon.window = prosperon.engine_start({width:500,height:500}) - console.log(prosperon.window) context = prosperon.window.make_renderer() } diff --git a/source/prosperon.c b/source/prosperon.c index b7db64f6..5c2efe3a 100644 --- a/source/prosperon.c +++ b/source/prosperon.c @@ -591,11 +591,6 @@ void script_startup(prosperon_rt *prt) JS_AddIntrinsicJSON(js); JS_AddIntrinsicMapSet(js); JS_AddIntrinsicTypedArrays(js); - JS_AddIntrinsicBigInt(js); - JS_AddIntrinsicBigFloat(js); - JS_AddIntrinsicBigDecimal(js); - JS_AddIntrinsicOperators(js); - JS_EnableBignumExt(js, 1); JS_SetContextOpaque(js, prt); prt->context = js; diff --git a/source/qjs_nota.c b/source/qjs_nota.c index cd1a9ae1..89b638b4 100755 --- a/source/qjs_nota.c +++ b/source/qjs_nota.c @@ -33,7 +33,7 @@ static int nota_stack_has(NotaEncodeContext *enc, JSValueConst val) for (int i = 0; i < len; i++) { JSValue elem = JS_GetPropertyUint32(ctx, enc->visitedStack, i); if (JS_IsObject(elem) && JS_IsObject(val)) { - if (JS_VALUE_GET_OBJ(elem) == JS_VALUE_GET_OBJ(val)) { + if (JS_StrictEq(ctx, elem, val)) { JS_FreeValue(ctx, elem); return 1; } @@ -143,9 +143,7 @@ static void nota_encode_value(NotaEncodeContext *enc, JSValueConst val, JSValueC break; } case JS_TAG_BIG_INT: - case JS_TAG_FLOAT64: - case JS_TAG_BIG_DECIMAL: - case JS_TAG_BIG_FLOAT: { + case JS_TAG_FLOAT64: { const char *str = JS_ToCString(ctx, replaced); nota_write_number_str(&enc->nb, str); JS_FreeCString(ctx, str); diff --git a/source/qjs_tracy.c b/source/qjs_tracy.c index d96d3835..70c9dc71 100644 --- a/source/qjs_tracy.c +++ b/source/qjs_tracy.c @@ -116,11 +116,11 @@ static JSValue js_tracy_zone_begin(JSContext *js, JSValue self, int argc, JSValu fn_name = ""; else fn_name = js_fn_name; - TracyCZoneCtx TCTX = ___tracy_emit_zone_begin_alloc(___tracy_alloc_srcloc(js_fn_linenum(js,argv[0]), fn_src, strlen(fn_src), fn_name, strlen(fn_name), (int)fn_src),1); +// TracyCZoneCtx TCTX = ___tracy_emit_zone_begin_alloc(___tracy_alloc_srcloc(js_fn_linenum(js,argv[0]), fn_src, strlen(fn_src), fn_name, strlen(fn_name), (int)fn_src),1); JS_FreeCString(js,js_fn_name); JS_Call(js, argv[0], JS_UNDEFINED, 0, NULL); - TracyCZoneEnd(TCTX); +// TracyCZoneEnd(TCTX); return JS_UNDEFINED; } diff --git a/source/qjs_wota.c b/source/qjs_wota.c index 28d7a44b..43b365d1 100644 --- a/source/qjs_wota.c +++ b/source/qjs_wota.c @@ -31,7 +31,7 @@ static int wota_stack_has(WotaEncodeContext *enc, JSValueConst val) for (int i = 0; i < len; i++) { JSValue elem = JS_GetPropertyUint32(ctx, enc->visited_stack, i); if (JS_IsObject(elem) && JS_IsObject(val)) - if (JS_VALUE_GET_OBJ(elem) == JS_VALUE_GET_OBJ(val)) { + if (JS_StrictEq(ctx, elem, val)) { JS_FreeValue(ctx, elem); return 1; } @@ -103,9 +103,7 @@ static void wota_encode_value(WotaEncodeContext *enc, JSValueConst val, JSValueC break; } case JS_TAG_FLOAT64: - case JS_TAG_BIG_INT: - case JS_TAG_BIG_DECIMAL: - case JS_TAG_BIG_FLOAT: { + case JS_TAG_BIG_INT: { double d; if (JS_ToFloat64(ctx, &d, replaced) < 0) { wota_write_sym(&enc->wb, WOTA_NULL); diff --git a/source/sprite.h b/source/sprite.h index b092e5cf..7e29b2f5 100644 --- a/source/sprite.h +++ b/source/sprite.h @@ -7,7 +7,7 @@ struct sprite{ HMM_Vec2 pos; // x,y coordinates of the sprite - HMM_Mat2 affine; // defines all deformation + HMM_Mat2 affine_m; // defines all deformation rect affine; // JSValue image; // the actual texture resource - perhaps SDL_GPUTexture, or SDL_Texture, or something else ... SDL_GPUTexture *tex;