Sami Vaarala
3d4a0e4108
Avoid temporary in duk_buffer_to_string()
8 years ago
Sami Vaarala
46ef04c989
Avoid side effects during string intern
Previous implementation avoided side effects during string table resize.
This is sufficient in most cases but not in the following:
- Caller pushes a string using duk_push_lstring(), with the data and
length referencing the data area of a dynamic or external buffer.
- When allocating a new duk_hstring a side effect triggers a finalizer.
- The finalizer resizes or reconfigures the dynamic/external buffer so
that the original duk_push_lstring() arguments are invalidated.
- When it's time to copy the data over into the duk_hstring, the pointer
and/or length are invalid and memory unsafe behavior follows.
Avoid this problem by preventing mark-and-sweep side effects for the duration
of the entire string intern processing.
8 years ago
Sami Vaarala
4f1e53faa1
Add testcase for string intern side effect risk
8 years ago
Sami Vaarala
25fc5309bd
Merge pull request #888 from svaarala/perf-test-fixes
Perf test fixes for buffer reworks
8 years ago
Sami Vaarala
d169e696d7
Perf test fixes for buffer reworks
8 years ago
Sami Vaarala
121f1da0e1
Merge pull request #886 from svaarala/lightfunc-proxy-coercion
Lightfunc and plain buffer as a Proxy handler
8 years ago
Sami Vaarala
3447a8e8c7
Plain buffer as Proxy handler, comment improvement
8 years ago
Sami Vaarala
7c406c4ca1
Add buffer as Proxy handler test
8 years ago
Sami Vaarala
f107d5a10c
Merge pull request #875 from svaarala/remove-duktape-buffer-object
Remove Duktape.Buffer support
8 years ago
Sami Vaarala
815104bde9
Releases: Duktape.Buffer removal
8 years ago
Sami Vaarala
16267bd484
2.0 migration notes for Duktape.Buffer removal
8 years ago
Sami Vaarala
1503b96ca8
Internal doc fixes for Duktape.Buffer removal
8 years ago
Sami Vaarala
5f35d229aa
Update dukweb example to reworked buffer bindings
8 years ago
Sami Vaarala
668fe031ea
Website changes for buffer changes
* Plain buffer behavior change
* Duktape.Buffer removal
* New custom calls: ArrayBuffer.allocPlain(), ArrayBuffer.plainOf(),
and String.fromBuffer()
8 years ago
Sami Vaarala
9f244c7301
Make duk_debug_proxy.js 1.x and 2.x compatible
8 years ago
Sami Vaarala
9276a50b8f
Polyfill to approximate removed Duktape.Buffer
8 years ago
Sami Vaarala
895134868b
DUK_USE_BUFFEROBJECT_SUPPORT metadata update
8 years ago
Sami Vaarala
9fb57da898
Testcase fixes for Duktape.Buffer removal
8 years ago
Sami Vaarala
d79f5e8921
Remove Duktape.Buffer support from code
Also some footprint optimization for typed array constructor: omit optimized
copy modes 0 and 1 and use fallback copy mode 2 in all cases.
8 years ago
Sami Vaarala
c079d33011
Merge pull request #882 from svaarala/add-typedarray-accumulation-example
Add typed array accumulation example
8 years ago
Sami Vaarala
a1642d38f6
Merge pull request #881 from svaarala/fix-console-extra-trivia
Console extra Proxy and JX improvements
8 years ago
Sami Vaarala
f7b7bb5e4b
Add typed array accumulation example
8 years ago
Sami Vaarala
f2188ec6fe
Console extra Proxy and JX improvements
* Tolerate Proxy setup errors in case Proxy throws (= disabled).
* Fix bug in JX encoding error handling. Incorrect quote marks caused
value to be number coerced (+v) rather than string coerced (''+v).
8 years ago
Sami Vaarala
d051324fe5
Merge pull request #877 from svaarala/add-selftest-realloc-test
Add selftest alloc/realloc/free test
8 years ago
Sami Vaarala
8c5926e650
Releases: alloc func self test
8 years ago
Sami Vaarala
379e3da5de
Add a minimal alloc func test to self tests
8 years ago
Sami Vaarala
4d36e60700
Merge pull request #871 from svaarala/add-regexp-literal-bracket-support
Add regexp literal bracket (at least closing bracket ']') support
8 years ago
Sami Vaarala
e7dc973c2a
Releases: right bracket in regexps
8 years ago
Sami Vaarala
43643fc11f
Add ES6 regexp syntax to matrix test
8 years ago
Sami Vaarala
3e505dab82
Makefile commented out config option
8 years ago
Sami Vaarala
0ec934ec6b
Website regexp leniency rewording, ES6 Annex ref
8 years ago
Sami Vaarala
8ca309733a
Testcase changes for ES6 literal right bracket
8 years ago
Sami Vaarala
8569bdd08d
Config option changes for regexp bracket parsing
8 years ago
Sami Vaarala
05c711b56b
Allow unescaped ']' in regexp syntax by default
Also merge the existing non-standard RegExp syntax options which are actually
part of ES6 Annex B now.
8 years ago
Sami Vaarala
f63e9fecaf
Merge pull request #864 from svaarala/plain-buffer-as-arraybuffer
Change plain buffers to behave like subset ArrayBuffer instances
8 years ago
Sami Vaarala
17f79198b9
Releases: plain buffer as ArrayBuffer, etc
8 years ago
Sami Vaarala
75b840806b
2.0 migration notes for buffers, pointers, lfuncs
8 years ago
Sami Vaarala
0c79e5c801
Internal doc fixes for plain buffer change
8 years ago
Sami Vaarala
af671d0435
Debugger classname renumbering
8 years ago
Sami Vaarala
b4b8b72d05
Testcase changes for plain buffers/pointers
8 years ago
Sami Vaarala
960efde0fa
Make plain buffers behave like ArrayBuffers
Change handling of plain buffers so that they behave like ArrayBuffer
instances to Ecmascript code, with limitations such as not being
extensible and all properties being virtualized. This simplifies
Ecmascript code as plain buffers are just lightweight ArrayBuffers
(similarly to how lightfuncs appear as function objects). There are
a lot of small changes in how the built-in objects and methods, and
the C API deals with plain buffer values.
Also make a few small changes to plain pointer and lightfunc handling
to improve consistency with how plain buffers are now handled.
8 years ago
Sami Vaarala
d3a8b1c034
Merge pull request #867 from svaarala/bug-json-bufobj-handling
Fix bufferobject handling in JSON
8 years ago
Sami Vaarala
f5a1cc5509
Releases: ArrayBuffer JSON serialization
8 years ago
Sami Vaarala
59241f8717
2.0 migration notes for buffer changes
8 years ago
Sami Vaarala
27ee099edb
Make ArrayBuffer indices non-enumerable
8 years ago
Sami Vaarala
1e2cdb4b4c
Fix JSON handling of bufferobjects
8 years ago
Sami Vaarala
0a7cb07685
Test for ArrayBuffer index non-enumerability
8 years ago
Sami Vaarala
aeb70e634a
Testcase fixes for JSON bufferobject serialization
8 years ago
Sami Vaarala
30a807d24e
Add bug testcase for JSON/JX/JC bufobj handling
8 years ago
Sami Vaarala
091eb02edd
Merge pull request #856 from svaarala/duk-harray-cleanups
Duk_harray fixes and cleanups
8 years ago