TODO (2897B)
1 Misc ideas: 2 - use custom printf to avoid compatibility issues with floating point numbers 3 - consistent naming for preprocessor defines 4 - unify coding style and naming conventions 5 - use names from the ECMA spec in library implementation 6 - use byte code emitters with typed arguments (for clarity) 7 - use 2 bytecode DynBufs in JSFunctionDef, one for reading, one for writing 8 and use the same wrappers in all phases 9 - use more generic method for line numbers in resolve_variables and resolve_labels 10 - use custom timezone support to avoid C library compatibility issues 11 12 Memory: 13 - use memory pools for objects, etc? 14 - test border cases for max number of atoms, object properties, string length 15 - add emergency malloc mode for out of memory exceptions. 16 - test all DynBuf memory errors 17 - test all js_realloc memory errors 18 - improve JS_ComputeMemoryUsage() with more info 19 20 Built-in standard library: 21 - BSD sockets 22 - modules: use realpath in module name normalizer and put it in quickjs-libc 23 - modules: if no ".", use a well known module loading path ? 24 - get rid of __loadScript, use more common name 25 26 REPL: 27 - debugger 28 - readline: support MS Windows terminal 29 - readline: handle dynamic terminal resizing 30 - readline: handle double width unicode characters 31 - multiline editing 32 - runtime object and function inspectors 33 - interactive object browser 34 - use more generic approach to display evaluation results 35 - improve directive handling: dispatch, colorize, completion... 36 - save history 37 - close all predefined methods in repl.js and jscalc.js 38 39 Optimization ideas: 40 - use 64 bit JSValue in 64 bit mode 41 - use JSValue as atoms and use a specific constant pool in functions to 42 reference atoms from the bytecode 43 - reuse stack slots for disjoint scopes, if strip 44 - add heuristic to avoid some cycles in closures 45 - small String (1 codepoint) with immediate storage 46 - perform static string concatenation at compile time 47 - add implicit numeric strings for Uint32 numbers? 48 - optimize `s += a + b`, `s += a.b` and similar simple expressions 49 - ensure string canonical representation and optimise comparisons and hashes? 50 - property access optimization on the global object, functions, 51 prototypes and special non extensible objects. 52 - create object literals with the correct length by backpatching length argument 53 - remove redundant set_loc_uninitialized/check_uninitialized opcodes 54 - peephole optim: push_atom_value, to_propkey -> push_atom_value 55 - peephole optim: put_loc x, get_loc_check x -> set_loc x 56 - convert slow array to fast array when all properties != length are numeric 57 - optimize destructuring assignments for global and local variables 58 - implement some form of tail-call-optimization 59 - optimize OP_apply 60 - optimize f(...b) 61 62 Test262o: 0/11262 errors, 463 excluded 63 Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch) 64 65 Test262: 66 Result: 58/83558 errors, 3356 excluded, 6000 skipped