From 68d1773417c7db2cd2583ff40d411d59a58e3ba1 Mon Sep 17 00:00:00 2001 From: The Ghost of FOSS' Future <163201376+sneedgroup-holder@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:32:51 +0000 Subject: [PATCH] Update qjs.c --- qjs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qjs.c b/qjs.c index 6924cb2..4f0d634 100644 --- a/qjs.c +++ b/qjs.c @@ -371,7 +371,7 @@ static const JSMallocFunctions mi_mf = { #define PROG_NAME "qjs" -void polyfiller(void) { +void polyfiller(ctx) { //POLYFILLS FOR QJS FILES BEGIN const char *pf = "globalThis.global = globalThis;\n" "global.console.error = console.log\n" @@ -668,7 +668,7 @@ start: eval_buf(ctx, str, strlen(str), "", JS_EVAL_TYPE_MODULE); } - polyfiller() + // polyfiller(ctx) for(i = 0; i < include_count; i++) { if (eval_file(ctx, include_list[i], 0)) @@ -714,12 +714,13 @@ start: if (eval_file(ctx, filename, module)) goto fail; } + + polyfiller(ctx) + if (interactive) { js_std_eval_binary(ctx, qjsc_repl, qjsc_repl_size, 0); } - polyfiller() - if (standalone || compile_file) { if (JS_IsException(ret)) { r = 1;