changes to update to newer quickjs version
Some checks failed
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled

This commit is contained in:
2025-05-01 12:50:03 -05:00
parent 600fbfd3b7
commit ead61e648a
8 changed files with 8 additions and 24 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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()
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -116,11 +116,11 @@ static JSValue js_tracy_zone_begin(JSContext *js, JSValue self, int argc, JSValu
fn_name = "<anonymous>";
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;
}

View File

@@ -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);

View File

@@ -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;