Skip to content

Commit b1f67df

Browse files
committed
2020-11-08 release
1 parent 7c312df commit b1f67df

23 files changed

+1870
-4294
lines changed

Changelog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2020-11-08:
2+
3+
- improved function parameter initializers
4+
- added std.setenv(), std.unsetenv() and std.getenviron()
5+
- added JS_EvalThis()
6+
- misc bug fixes
7+
18
2020-09-06:
29

310
- added logical assignment operators

Makefile

+8-7
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ endif
2828
# Windows cross compilation from Linux
2929
#CONFIG_WIN32=y
3030
# use link time optimization (smaller and faster executables but slower build)
31-
CONFIG_LTO=y
31+
#CONFIG_LTO=y
3232
# consider warnings as errors (for development)
33-
#CONFIG_WERROR=y
33+
CONFIG_WERROR=y
3434
# force 32 bit build for some utilities
3535
#CONFIG_M32=y
3636

@@ -53,7 +53,11 @@ CONFIG_BIGNUM=y
5353
OBJDIR=.obj
5454

5555
ifdef CONFIG_WIN32
56-
CROSS_PREFIX=i686-w64-mingw32-
56+
ifdef CONFIG_M32
57+
CROSS_PREFIX=i686-w64-mingw32-
58+
else
59+
CROSS_PREFIX=x86_64-w64-mingw32-
60+
endif
5761
EXE=.exe
5862
else
5963
CROSS_PREFIX=
@@ -281,15 +285,12 @@ $(OBJDIR)/%.check.o: %.c | $(OBJDIR)
281285
regexp_test: libregexp.c libunicode.c cutils.c
282286
$(CC) $(LDFLAGS) $(CFLAGS) -DTEST -o $@ libregexp.c libunicode.c cutils.c $(LIBS)
283287

284-
jscompress: jscompress.c
285-
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ jscompress.c
286-
287288
unicode_gen: $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o libunicode.c unicode_gen_def.h
288289
$(HOST_CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o
289290

290291
clean:
291292
rm -f repl.c qjscalc.c out.c
292-
rm -f *.a *.o *.d *~ jscompress unicode_gen regexp_test $(PROGS)
293+
rm -f *.a *.o *.d *~ unicode_gen regexp_test $(PROGS)
293294
rm -f hello.c test_fib.c
294295
rm -f examples/*.so tests/*.so
295296
rm -rf $(OBJDIR)/ *.dSYM/ qjs-debug

TODO

+30-38
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,48 @@
1-
Misc:
2-
- use realpath in module name normalizer and put it in quickjs-libc
3-
- use custom printf to avoid C library compatibility issues
4-
- rename CONFIG_ALL_UNICODE, CONFIG_BIGNUM, CONFIG_ATOMICS, CONFIG_CHECK_JSVALUE ?
1+
Bugs:
2+
- modules: better error handling with cyclic module references
3+
4+
Misc ideas:
5+
- use custom printf to avoid compatibility issues with floating point numbers
6+
- consistent naming for preprocessor defines
57
- unify coding style and naming conventions
68
- use names from the ECMA spec in library implementation
7-
- modules: if no ".", use a well known module loading path ?
8-
- use JSHoistedDef only for global variables (JSHoistedDef.var_name != JS_ATOM_NULL)
9-
- add index in JSVarDef and is_arg flag to merge args and vars in JSFunctionDef
10-
- replace most JSVarDef flags with var_type enumeration
119
- use byte code emitters with typed arguments (for clarity)
1210
- use 2 bytecode DynBufs in JSFunctionDef, one for reading, one for writing
1311
and use the same wrappers in all phases
1412
- use more generic method for line numbers in resolve_variables and resolve_labels
1513
- use custom timezone support to avoid C library compatibility issues
1614

1715
Memory:
16+
- use memory pools for objects, etc?
1817
- test border cases for max number of atoms, object properties, string length
1918
- add emergency malloc mode for out of memory exceptions.
2019
- test all DynBuf memory errors
2120
- test all js_realloc memory errors
22-
- bignum: handle memory errors
23-
- use memory pools for objects, etc?
2421
- improve JS_ComputeMemoryUsage() with more info
2522

26-
Optimizations:
23+
Built-in standard library:
24+
- BSD sockets
25+
- modules: use realpath in module name normalizer and put it in quickjs-libc
26+
- modules: if no ".", use a well known module loading path ?
27+
- get rid of __loadScript, use more common name
28+
29+
REPL:
30+
- debugger
31+
- readline: support MS Windows terminal
32+
- readline: handle dynamic terminal resizing
33+
- readline: handle double width unicode characters
34+
- multiline editing
35+
- runtime object and function inspectors
36+
- interactive object browser
37+
- use more generic approach to display evaluation results
38+
- improve directive handling: dispatch, colorize, completion...
39+
- save history
40+
- close all predefined methods in repl.js and jscalc.js
41+
42+
Optimization ideas:
2743
- 64-bit atoms in 64-bit mode ?
28-
- use auto-init properties for more global objects
44+
- 64-bit small bigint in 64-bit mode ?
2945
- reuse stack slots for disjoint scopes, if strip
30-
- optimize `for of` iterator for built-in array objects
3146
- add heuristic to avoid some cycles in closures
3247
- small String (0-2 charcodes) with immediate storage
3348
- perform static string concatenation at compile time
@@ -36,43 +51,20 @@ Optimizations:
3651
- optimize `s += a + b`, `s += a.b` and similar simple expressions
3752
- ensure string canonical representation and optimise comparisons and hashes?
3853
- remove JSObject.first_weak_ref, use bit+context based hashed array for weak references
39-
- optimize function storage with length and name accessors?
4054
- property access optimization on the global object, functions,
4155
prototypes and special non extensible objects.
4256
- create object literals with the correct length by backpatching length argument
4357
- remove redundant set_loc_uninitialized/check_uninitialized opcodes
4458
- peephole optim: push_atom_value, to_propkey -> push_atom_value
4559
- peephole optim: put_loc x, get_loc_check x -> set_loc x
46-
- comparative performance benchmark
47-
- use variable name when throwing uninitialized exception if available
4860
- convert slow array to fast array when all properties != length are numeric
4961
- optimize destructuring assignments for global and local variables
5062
- implement some form of tail-call-optimization
5163
- optimize OP_apply
5264
- optimize f(...b)
5365

54-
Extensions:
55-
- support more features in [features] section
56-
- add built-in preprocessor in compiler, get rid of jscompress
57-
handle #if, #ifdef, #line, limited support for #define
58-
- get rid of __loadScript, use more common name
59-
- BSD sockets
60-
61-
REPL:
62-
- debugger
63-
- readline: support MS Windows terminal
64-
- readline: handle dynamic terminal resizing
65-
- readline: handle double width unicode characters
66-
- multiline editing
67-
- runtime object and function inspectors
68-
- interactive object browser
69-
- use more generic approach to display evaluation results
70-
- improve directive handling: dispatch, colorize, completion...
71-
- save history
72-
- close all predefined methods in repl.js and jscalc.js
73-
7466
Test262o: 0/11262 errors, 463 excluded
7567
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
7668

77-
Test262: 30/71748 errors, 868 excluded, 474 skipped
78-
Test262 commit: 24c67328062383079ada85f4d253eb0526fd209b
69+
Result: 51/75119 errors, 899 excluded, 570 skipped
70+
Test262 commit: 1c33fdb0ca60fb9d7392403be769ed0d26209132

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2020-09-06
1+
2020-11-08

0 commit comments

Comments
 (0)