Skip to content

Commit 8900766

Browse files
committed
2020-07-05 release
1 parent 1722758 commit 8900766

30 files changed

+3717
-1671
lines changed

Changelog

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2020-07-05:
2+
3+
- modified JS_GetPrototype() to return a live value
4+
- REPL: support unicode characters larger than 16 bits
5+
- added os.Worker
6+
- improved object serialization
7+
- added std.parseExtJSON
8+
- misc bug fixes
9+
110
2020-04-12:
211

312
- added cross realm support

Makefile

+17-10
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ DEFINES:=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(shell cat VERSION)\"
9999
ifdef CONFIG_BIGNUM
100100
DEFINES+=-DCONFIG_BIGNUM
101101
endif
102+
ifdef CONFIG_WIN32
103+
DEFINES+=-D__USE_MINGW_ANSI_STDIO # for standard snprintf behavior
104+
endif
105+
102106
CFLAGS+=$(DEFINES)
103107
CFLAGS_DEBUG=$(CFLAGS) -O0
104108
CFLAGS_SMALL=$(CFLAGS) -Os
@@ -115,8 +119,8 @@ CFLAGS+=-p
115119
LDFLAGS+=-p
116120
endif
117121
ifdef CONFIG_ASAN
118-
CFLAGS+=-fsanitize=address
119-
LDFLAGS+=-fsanitize=address
122+
CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
123+
LDFLAGS+=-fsanitize=address -fno-omit-frame-pointer
120124
endif
121125
ifdef CONFIG_WIN32
122126
LDEXPORT=
@@ -166,9 +170,10 @@ QJS_LIB_OBJS+=$(OBJDIR)/libbf.o
166170
QJS_OBJS+=$(OBJDIR)/qjscalc.o
167171
endif
168172

173+
HOST_LIBS=-lm -ldl -lpthread
169174
LIBS=-lm
170175
ifndef CONFIG_WIN32
171-
LIBS+=-ldl
176+
LIBS+=-ldl -lpthread
172177
endif
173178

174179
$(OBJDIR):
@@ -187,7 +192,7 @@ ifneq ($(CROSS_PREFIX),)
187192

188193
$(QJSC): $(OBJDIR)/qjsc.host.o \
189194
$(patsubst %.o, %.host.o, $(QJS_LIB_OBJS))
190-
$(HOST_CC) $(LDFLAGS) -o $@ $^ $(LIBS)
195+
$(HOST_CC) $(LDFLAGS) -o $@ $^ $(HOST_LIBS)
191196

192197
endif #CROSS_PREFIX
193198

@@ -239,13 +244,13 @@ libunicode-table.h: unicode_gen
239244
endif
240245

241246
run-test262: $(OBJDIR)/run-test262.o $(QJS_LIB_OBJS)
242-
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -lpthread
247+
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
243248

244249
run-test262-debug: $(patsubst %.o, %.debug.o, $(OBJDIR)/run-test262.o $(QJS_LIB_OBJS))
245-
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -lpthread
250+
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
246251

247252
run-test262-32: $(patsubst %.o, %.m32.o, $(OBJDIR)/run-test262.o $(QJS_LIB_OBJS))
248-
$(CC) -m32 $(LDFLAGS) -o $@ $^ $(LIBS) -lpthread
253+
$(CC) -m32 $(LDFLAGS) -o $@ $^ $(LIBS)
249254

250255
# object suffix order: nolto, [m32|m32s]
251256

@@ -285,7 +290,7 @@ unicode_gen: $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o libunicode.c u
285290
clean:
286291
rm -f repl.c qjscalc.c out.c
287292
rm -f *.a *.o *.d *~ jscompress unicode_gen regexp_test $(PROGS)
288-
rm -f hello.c hello_module.c test_fib.c
293+
rm -f hello.c test_fib.c
289294
rm -f examples/*.so tests/*.so
290295
rm -rf $(OBJDIR)/ *.dSYM/ qjs-debug
291296
rm -rf run-test262-debug run-test262-32
@@ -379,10 +384,11 @@ endif
379384

380385
test: qjs
381386
./qjs tests/test_closure.js
382-
./qjs tests/test_op.js
387+
./qjs tests/test_language.js
383388
./qjs tests/test_builtin.js
384389
./qjs tests/test_loop.js
385390
./qjs tests/test_std.js
391+
./qjs tests/test_worker.js
386392
ifndef CONFIG_DARWIN
387393
ifdef CONFIG_BIGNUM
388394
./qjs --bignum tests/test_bjson.js
@@ -398,10 +404,11 @@ ifdef CONFIG_BIGNUM
398404
endif
399405
ifdef CONFIG_M32
400406
./qjs32 tests/test_closure.js
401-
./qjs32 tests/test_op.js
407+
./qjs32 tests/test_language.js
402408
./qjs32 tests/test_builtin.js
403409
./qjs32 tests/test_loop.js
404410
./qjs32 tests/test_std.js
411+
./qjs32 tests/test_worker.js
405412
ifdef CONFIG_BIGNUM
406413
./qjs32 --bignum tests/test_op_overloading.js
407414
./qjs32 --bignum tests/test_bignum.js

TODO

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Misc:
2+
- use realpath in module name normalizer and put it in quickjs-libc
23
- use custom printf to avoid C library compatibility issues
34
- rename CONFIG_ALL_UNICODE, CONFIG_BIGNUM, CONFIG_ATOMICS, CONFIG_CHECK_JSVALUE ?
45
- unify coding style and naming conventions
@@ -56,12 +57,12 @@ Extensions:
5657
handle #if, #ifdef, #line, limited support for #define
5758
- get rid of __loadScript, use more common name
5859
- BSD sockets
59-
- Workers
6060

6161
REPL:
6262
- debugger
6363
- readline: support MS Windows terminal
6464
- readline: handle dynamic terminal resizing
65+
- readline: handle double width unicode characters
6566
- multiline editing
6667
- runtime object and function inspectors
6768
- interactive object browser
@@ -73,6 +74,5 @@ REPL:
7374
Test262o: 0/11262 errors, 463 excluded
7475
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
7576

76-
Test262: 28/70829 errors, 877 excluded, 425 skipped
77-
Test262 commit: 4a8e49b3ca7f9f74a4cafe6621ff9ba548ccc353
78-
77+
Test262: 30/71095 errors, 870 excluded, 549 skipped
78+
Test262 commit: 281eb10b2844929a7c0ac04527f5b42ce56509fd

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2020-04-12
1+
2020-07-05

cutils.h

+4
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ void dbuf_free(DynBuf *s);
268268
static inline BOOL dbuf_error(DynBuf *s) {
269269
return s->error;
270270
}
271+
static inline void dbuf_set_error(DynBuf *s)
272+
{
273+
s->error = TRUE;
274+
}
271275

272276
#define UTF8_CHAR_LEN_MAX 6
273277

doc/jsbignum.html

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/jsbignum.pdf

-8 Bytes
Binary file not shown.

doc/quickjs.html

+77-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/quickjs.pdf

1.82 KB
Binary file not shown.

0 commit comments

Comments
 (0)