1 Star 2 Fork 0

中文编程/QuickJS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TODO 3.74 KB
一键复制 编辑 原始数据 按行查看 历史
llgoer 提交于 2019-07-29 10:31 +08:00 . 更新到2019-07-28版本
- fix regexp skip in js_parse_skip_parens_token()
- 64-bit atoms in 64-bit mode?
- rename CONFIG_ALL_UNICODE, CONFIG_BIGNUM, CONFIG_ATOMICS, CONFIG_CHECK_JSVALUE ?
- unify coding style and naming conventions
- use names from the ECMA spec in library implementation
- modules: if no ".", use a well known module loading path ?
- use JSHoistedDef only for global variables (JSHoistedDef.var_name != JS_ATOM_NULL)
- add index in JSVarDef and is_arg flag to merge args and vars in JSFunctionDef
- replace most JSVarDef flags with var_type enumeration
- use byte code emitters with typed arguments (for clarity)
- use 2 bytecode DynBufs in JSFunctionDef, one for reading, one for writing
and use the same wrappers in all phases
- use more generic method for line numbers in resolve_variables and resolve_labels
Memory:
- test border cases for max number of atoms, object properties, string length
- add emergency malloc mode for out of memory exceptions.
- test all DynBuf memory errors
- test all js_realloc memory errors
- bignum: handle memory errors
- use memory pools for objects, etc?
- improve JS_ComputeMemoryUsage() with more info
Optimizations:
- use auto-init properties for more global objects
- reuse stack slots for disjoint scopes, if strip
- optimize `for of` iterator for built-in array objects
- add heuristic to avoid some cycles in closures
- small String (0-2 charcodes) with immediate storage
- perform static string concatenation at compile time
- optimize string concatenation with ropes or miniropes?
- add implicit numeric strings for Uint32 numbers?
- optimize `s += a + b`, `s += a.b` and similar simple expressions
- ensure string canonical representation and optimise comparisons and hashes?
- remove JSObject.first_weak_ref, use bit+context based hashed array for weak references
- optimize function storage with length and name accessors?
- property access optimization on the global object, functions,
prototypes and special non extensible objects.
- create object literals with the correct length by backpatching length argument
- remove redundant set_loc_uninitialized/check_uninitialized opcodes
- peephole optim: push_atom_value, to_propkey -> push_atom_value
- peephole optim: put_loc x, get_loc_check x -> set_loc x
- comparative performance benchmark
- use variable name when throwing uninitialized exception if available
- convert slow array to fast array when all properties != length are numeric
- optimize destructuring assignments for global and local variables
- implement some form of tail-call-optimization
- debugger keyword support
- optimize OP_apply
- optimize f(...b)
Extensions:
- support more features in [features] section
- add TC39 stage 3 proposals: String.prototype.matchAll, Symbol.matchAll
- fix preprocessor bug if nested #ifdef in jscompress.c
- add built-in preprocessor in compiler, get rid of jscompress
handle #if, #ifdef, #line, limited support for #define
- limited support for web assembly
- get rid of __loadScript, use more common name
- BSD sockets
- Process or thread control
- use custom printf to avoid C library compatibility issues
- use custom timezone support to avoid C library compatibility issues
REPL:
- strip internal functions from stack trace
- readline: support MS Windows terminal
- readline: handle dynamic terminal resizing
- multiline editing
- debugger
- runtime object and function inspectors
- interactive object browser
- use more generic approach to display evaluation results
- improve directive handling: dispatch, colorize, completion...
- save history
- close all predefined methods in repl.js and jscalc.js
Test262o: 0/11262 errors, 463 excluded
Test262: 33/58145 errors, 785 excluded, 5576 skipped
Test262bn: 39/60250 errors, 718 excluded, 4587 skipped
test262 commit: 2ee3864136747ee69401b2d266e234cdd0a95965
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Program-in-Chinese/QuickJS.git
git@gitee.com:Program-in-Chinese/QuickJS.git
Program-in-Chinese
QuickJS
QuickJS
master

搜索帮助