]> git.kaiwu.me - njs.git/commit
Introduced memory-efficient arrays.
authorDmitry Volyntsev <xeioex@nginx.com>
Tue, 4 Feb 2020 17:35:02 +0000 (20:35 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Tue, 4 Feb 2020 17:35:02 +0000 (20:35 +0300)
commit58ebb38a063a3be7167da944b800f6c44cf90972
tree9b843453570f7538f449b403f0d0ffd5095a929f
parent912ab38760faa68e77a6b863ec5ccb26e8aebd50
Introduced memory-efficient arrays.

1) If "length" of ordinary array exceeds 32768 it is converted to
to array-like object.

2) Array.prototype.concat() is rewritten according to the spec.
3) Array.prototype.slice() is rewritten according to the spec.
20 files changed:
src/njs_array.c
src/njs_array.h
src/njs_array_buffer.c
src/njs_chb.h
src/njs_clang.h
src/njs_crypto.c
src/njs_date.c
src/njs_error.c
src/njs_json.c
src/njs_module.c
src/njs_object.c
src/njs_object.h
src/njs_object_prop.c
src/njs_promise.c
src/njs_regexp.c
src/njs_typed_array.c
src/njs_value.c
src/njs_value.h
src/test/njs_benchmark.c
src/test/njs_unit_test.c