Sami Vaarala
502fe68b2e
API docs for duk_require_{callable,function}()
9 years ago
Sami Vaarala
f8f72cb298
Improve API require/index error messages
* Add duk_require_function() and duk_require_callable() API calls
* Make duk_is_callable() a macro which calls duk_is_function()
* Include index for "invalid index" errors
* Add expected type and offending type/value for duk_require_xxx() errors
* Improve Array.prototype.forEach() and other iterator errors
9 years ago
Sami Vaarala
6c885b173a
Merge pull request #390 from svaarala/writable-error-filename-linenumber
Change error accessor properties to make .fileName, .lineNumber, and .stack normally writable
9 years ago
Sami Vaarala
3ed4f19c12
Releases: error properties writable
9 years ago
Sami Vaarala
ac17473292
Website error property clarifications
9 years ago
Sami Vaarala
e0b793c991
Polyfills for error .fileName etc writing behavior
- One polyfill to ensure Duktape 1.3.0 behavior
- One polyfill to ensure Duktape 1.4.0 behavior
If the write behavior change is an issue, you can use the first polyfill
to bring back Duktape 1.3.0 behavior.
9 years ago
Sami Vaarala
ef3841c827
Testcase for err.lineNumber etc assignment
9 years ago
Sami Vaarala
d8e49b7f41
Simulate a defprop in error .fileName etc setters
Previous behavior was to ignore the setter call, so that attempting a write
would be a no-op: "err.fileName = 'dummy';" would do nothing. Because the
inherited setter is configurable, the user could still create an own property
of the same name using Object.defineProperty() or duk_def_prop() but this is
not very intuitive nor very well documented.
The updated behavior is to make the .fileName, .lineNumber, and .stack setter
make the duk_def_prop() call automatically so that writing to these properties
will seem to work as if the property was not an inherited accessor.
This matches how e.g. V8 and Spidermonkey work, and also matches how Duktape
works when tracebacks are disabled and .fileName and .lineNumber are concrete
own properties.
9 years ago
Sami Vaarala
aff03ff5a4
Merge pull request #450 from svaarala/releases-segfault-gh449
Add releases entry for existing fix for #449
9 years ago
Sami Vaarala
ce2a144c7f
Merge pull request #451 from svaarala/v1.2.5-release-prep
v1.2.5 release preparation: releases list and website download link
9 years ago
Sami Vaarala
24ab663e37
Add 1.2.5 download link
9 years ago
Sami Vaarala
788e364f14
Releases: v1.2.5
9 years ago
Sami Vaarala
b1d9fa4c2f
Releases: compiler ivalue segfault GH-449
9 years ago
Sami Vaarala
bcdee88a8d
Merge pull request #448 from svaarala/fix-json-ptrcomp-build
Fix build error when using ptr compression
9 years ago
Sami Vaarala
bdb88786eb
Fix build error when using ptr compression
9 years ago
Sami Vaarala
92d0329a6a
Merge pull request #442 from svaarala/json-enc-proxy-testcase-improvement
Improve JSON.stringify() Proxy tests
9 years ago
Sami Vaarala
30d039db7e
XXX note for Proxy trap result validation missing
9 years ago
Sami Vaarala
ba3962cf21
Clarify Proxy trap result limitation on website
9 years ago
Sami Vaarala
6f9047643a
Known issue for Proxy JSON stringify trap behavior
9 years ago
Sami Vaarala
289f9bffe9
Add more JSON stringify Proxy tests
9 years ago
Sami Vaarala
288dbc4a68
Merge pull request #446 from svaarala/perf-json-slowpath-cycle-detection
Improve JSON.stringify() slow path loop detection performance
9 years ago
Sami Vaarala
707f7c5fcb
Releases: JSON slow path loop detect
9 years ago
Sami Vaarala
9f90003339
Testcases for slow path loop detection changes
Cover both parts of the hybrid algorithm: visited[] array and loop
detection object.
9 years ago
Sami Vaarala
7857441bac
Use hybrid loop detection for slow path JSON
9 years ago
Sami Vaarala
a0bb740b7b
Break out of timing test if time too large
9 years ago
Sami Vaarala
3ebad08ca9
Merge pull request #445 from svaarala/perf-json-fastpath-jxjc-indent-support
Add indent and JX/JC support into the JSON.stringify() fast path
9 years ago
Sami Vaarala
4c6a2e4dff
Releases: JSON stringify() indent and JX/JC
9 years ago
Sami Vaarala
12a79e36b9
JSON stringify fast path config option update
Document new limitations.
9 years ago
Sami Vaarala
97ece21279
Testcase improvements for JSON fast path changes
9 years ago
Sami Vaarala
4a59d4df8c
Support JX/JC in JSON.stringify() fast path
Also fix a minor fast path bug when unboxing String, Number, or Boolean.
Recursion depth was not decremented so it would accumulate and potentially
cause the fast path to fail unnecessarily. Outwardly this has no other
impact than the serialization being slower than intended.
9 years ago
Sami Vaarala
a0ec5e656c
Support indent in JSON.stringify() fast path
9 years ago
Sami Vaarala
3f008f3239
Merge pull request #444 from svaarala/perf-json-stringify-indent-rework
Simplify JSON.stringify() slow path indent handling
9 years ago
Sami Vaarala
ade141e95f
Releases: JSON indent
9 years ago
Sami Vaarala
3b13718d50
Improve JSON indentation handling
Copy already emitted indent prefix so that we can efficiently emit deep
indents. Code footprint is still about the same but the loop is much
faster.
9 years ago
Sami Vaarala
d8e3e8a856
Simplify JSON.stringify() gap/indent handling
9 years ago
Sami Vaarala
f8d5bba92c
More detailed testcases for indented JSON
Additional tests should exercise the new indent algorithm corner cases.
9 years ago
Sami Vaarala
b3630e22e5
Perf tests for indented JSON
9 years ago
Sami Vaarala
81a788d592
Merge pull request #440 from svaarala/website-detect-websurf-index-page
Detect and greet NetSurf users on index page
9 years ago
Sami Vaarala
7a3fcfe0d6
Merge pull request #439 from svaarala/website-flip-download-list
Flip download list order to match releases list
9 years ago
Sami Vaarala
e9997eb8fc
Detect and greet NetSurf users on index page
9 years ago
Sami Vaarala
c9db0da9b9
Flip download list order to match releases list
Most users seem to prefer newest-first ordering.
9 years ago
Sami Vaarala
26d1bb9d25
Merge pull request #417 from svaarala/not-callable-error-improvement
More verbose error message for "not callable"
9 years ago
Sami Vaarala
e8c1dd82ee
Releases: call handling error messages
9 years ago
Sami Vaarala
50a477b6c2
Makefile fixes for paranoid errors
9 years ago
Sami Vaarala
d3ee9bacb4
Matrix compile fix for paranoid errors
9 years ago
Sami Vaarala
d0f6d7f7a3
Sandboxing doc update for paranoid errors
Config option was renamed.
9 years ago
Sami Vaarala
39094df3df
Testcase fixes for call error messages
Fix some expect strings and add a specific test for call errors.
9 years ago
Sami Vaarala
8717df276f
Paranoid error message for call handling
Also handle config option rename.
9 years ago
Sami Vaarala
293b36e1b2
Config option changes for paranoid errors
9 years ago
Sami Vaarala
77c2635ed5
Merge pull request #394 from svaarala/perf-tval-updref-optimize
Optimize DUK_TVAL_SET_TVAL_UPDREF() for speed and size
9 years ago