Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ codegen: $(QJSC)
$(QJSC) -e -o gen/hello.c examples/hello.js
$(QJSC) -e -o gen/hello_module.c -m examples/hello_module.js
$(QJSC) -e -o gen/test_fib.c -M examples/fib.so,fib -m examples/test_fib.js
$(QJSC) -C -ss -o gen/builtin-array-fromasync.h builtin-array-fromasync.js
$(QJSC) -C -ss -o builtin-array-fromasync.h builtin-array-fromasync.js

debug:
BUILD_TYPE=Debug $(MAKE)
Expand Down
4 changes: 2 additions & 2 deletions amalgam.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const quickjs_libc_h = loadFile("quickjs-libc.h")
const quickjs_opcode_h = loadFile("quickjs-opcode.h")
const xsum_c = loadFile("xsum.c")
const xsum_h = loadFile("xsum.h")
const gen_builtin_array_fromasync_h = loadFile("gen/builtin-array-fromasync.h")
const gen_builtin_array_fromasync_h = loadFile("builtin-array-fromasync.h")

let source = "#if defined(QJS_BUILD_LIBC) && defined(__linux__) && !defined(_GNU_SOURCE)\n"
+ "#define _GNU_SOURCE\n"
Expand All @@ -43,7 +43,7 @@ let source = "#if defined(QJS_BUILD_LIBC) && defined(__linux__) && !defined(_GNU
source = source.replace(/#include "quickjs-atom.h"/g, quickjs_atom_h)
source = source.replace(/#include "quickjs-opcode.h"/g, quickjs_opcode_h)
source = source.replace(/#include "libregexp-opcode.h"/g, libregexp_opcode_h)
source = source.replace(/#include "gen\/builtin-array-fromasync.h"/g,
source = source.replace(/#include "builtin-array-fromasync.h"/g,
gen_builtin_array_fromasync_h)
source = source.replace(/#include "[^"]+"/g, "")
writeFile(execArgv[2] ?? "quickjs-amalgam.c", source)
File renamed without changes.
2 changes: 1 addition & 1 deletion quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -7447,7 +7447,7 @@ int JS_IsInstanceOf(JSContext *ctx, JSValueConst val, JSValueConst obj)
return JS_OrdinaryIsInstanceOf(ctx, val, obj);
}

#include "gen/builtin-array-fromasync.h"
#include "builtin-array-fromasync.h"

static JSValue js_bytecode_autoinit(JSContext *ctx, JSObject *p, JSAtom atom,
void *opaque)
Expand Down