Sami Vaarala
dfc26f4ac4
Add support for user provided random provider
Remove tinyrandom "get bits" variant altogether to simplify the needs:
there's just one primitive, to return an IEEE double in the range [0,1[.
9 years ago
Sami Vaarala
96d301b3cb
Rename src/ to src-input/ to match dist
With this change the directory naming in the main repo and dist is the same.
8 years ago
Sami Vaarala
4a8f8eee80
Fix Math two-arg function eval order
The specification requires left-to-right ToNumber() coercion. Previous
implementation had multiple duk_to_number() calls in one expression which
doesn't have a guaranteed ordering and indeed evaluated right-to-left on
x64.
8 years ago
Sami Vaarala
a7f1adaf63
Remove Duktape specific error subtypes
These don't play well with the API currently: the Duktape specific error
codes don't have Ecmascript Error class counterparts so they don't get
represented usefully as Ecmascript objects (e.g. AllocError is a plain
Error from Ecmascript point of view).
There's no real need for Duktape specific error code. Some of the codes
had become unused; a couple were used but Ecmascript standard types can
be used instead.
Also minor error message tweaking.
9 years ago
Sami Vaarala
1fa66cd25a
Symbol visibility changes for code and headers
10 years ago
Sami Vaarala
5957205ef1
Avoid plain function names in math code
10 years ago
Sami Vaarala
e6db67b33e
Rename duk_get_magic() to duk_get_current_magic()
The previous name conflicts with the upcoming duk_get_magic() and
duk_set_magic() calls which edit the properties of an arbitrary
function object.
10 years ago
Sami Vaarala
efb9776f91
A round of internal typing fixes (midcommit)
11 years ago
Sami Vaarala
7023bffa8b
Avoid direct func pointers to built-ins on MSVC
11 years ago
Sami Vaarala
c889764db3
add stubbed Math built-in for BCC torturing
11 years ago
Sami Vaarala
d26da70fbb
wrap math functions
11 years ago
Sami Vaarala
111ffd26d9
add a NetBSD specific fix to a few Math.pow() issues (test-bug-netbsd-math.pow.js); these may be a wider issue but fix for NetBSD for now
11 years ago
Sami Vaarala
54fb01c3be
prepend a 'duk__' prefix to a bunch of internal functions
11 years ago
Sami Vaarala
7f3feeac24
-Wextra fixes
11 years ago
Sami Vaarala
9d89e80f13
typing cleanup
11 years ago
Sami Vaarala
2d515afc70
rename duk_builtin_xxx -> duk_bi_xxx in code
11 years ago
Sami Vaarala
86acd7478a
make as many data / pointer tables 'const' as possible to allow them to compiled into the text section
11 years ago
Sami Vaarala
98cd7e9298
rework Math built-in to use shared helpers
11 years ago
Sami Vaarala
11ae874efd
C typing fixes
11 years ago
Sami Vaarala
2a26747436
change NAN references to DUK_DOUBLE_NAN; don't define NAN if missing any longer in duk_features.h
11 years ago
Sami Vaarala
d1c43c2d84
change fpclassify(), signbit() call sites, change FP_NAN -> DUK_FP_NAN (and same for other similar constants)
11 years ago
Sami Vaarala
508656c1d3
fix overflow warning on gcc-3.3 for INFINITY
11 years ago
Sami Vaarala
43dd685962
workaround for some uclibc's lacking fmin/fmax and round
11 years ago
Sami Vaarala
1c1daff274
fixme notes, gcc-4.0 warnings
11 years ago
Sami Vaarala
a432b396e4
fix Math.round() and Math.pow(), now correct (better?) Ecmascript semantics
12 years ago
Sami Vaarala
e62e733eab
a bunch of builtins
12 years ago