mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Update qjs.c
This commit is contained in:
parent
e5fb17e956
commit
68d1773417
1 changed files with 5 additions and 4 deletions
9
qjs.c
9
qjs.c
|
@ -371,7 +371,7 @@ static const JSMallocFunctions mi_mf = {
|
||||||
|
|
||||||
#define PROG_NAME "qjs"
|
#define PROG_NAME "qjs"
|
||||||
|
|
||||||
void polyfiller(void) {
|
void polyfiller(ctx) {
|
||||||
//POLYFILLS FOR QJS FILES BEGIN
|
//POLYFILLS FOR QJS FILES BEGIN
|
||||||
const char *pf = "globalThis.global = globalThis;\n"
|
const char *pf = "globalThis.global = globalThis;\n"
|
||||||
"global.console.error = console.log\n"
|
"global.console.error = console.log\n"
|
||||||
|
@ -668,7 +668,7 @@ start:
|
||||||
eval_buf(ctx, str, strlen(str), "<input>", JS_EVAL_TYPE_MODULE);
|
eval_buf(ctx, str, strlen(str), "<input>", JS_EVAL_TYPE_MODULE);
|
||||||
}
|
}
|
||||||
|
|
||||||
polyfiller()
|
// polyfiller(ctx)
|
||||||
|
|
||||||
for(i = 0; i < include_count; i++) {
|
for(i = 0; i < include_count; i++) {
|
||||||
if (eval_file(ctx, include_list[i], 0))
|
if (eval_file(ctx, include_list[i], 0))
|
||||||
|
@ -714,12 +714,13 @@ start:
|
||||||
if (eval_file(ctx, filename, module))
|
if (eval_file(ctx, filename, module))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
polyfiller(ctx)
|
||||||
|
|
||||||
if (interactive) {
|
if (interactive) {
|
||||||
js_std_eval_binary(ctx, qjsc_repl, qjsc_repl_size, 0);
|
js_std_eval_binary(ctx, qjsc_repl, qjsc_repl_size, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
polyfiller()
|
|
||||||
|
|
||||||
if (standalone || compile_file) {
|
if (standalone || compile_file) {
|
||||||
if (JS_IsException(ret)) {
|
if (JS_IsException(ret)) {
|
||||||
r = 1;
|
r = 1;
|
||||||
|
|
Loading…
Reference in a new issue