quickjs 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/quickjsrb/extconf.rb +4 -6
- data/ext/quickjsrb/quickjs/cutils.h +20 -0
- data/ext/quickjsrb/quickjs/dtoa.c +1626 -0
- data/ext/quickjsrb/quickjs/dtoa.h +83 -0
- data/ext/quickjsrb/quickjs/libregexp.c +34 -6
- data/ext/quickjsrb/quickjs/libregexp.h +5 -0
- data/ext/quickjsrb/quickjs/libunicode.c +201 -201
- data/ext/quickjsrb/quickjs/qjs.c +0 -52
- data/ext/quickjsrb/quickjs/qjsc.c +1 -29
- data/ext/quickjsrb/quickjs/quickjs-atom.h +0 -17
- data/ext/quickjsrb/quickjs/quickjs-opcode.h +1 -4
- data/ext/quickjsrb/quickjs/quickjs.c +3482 -6322
- data/ext/quickjsrb/quickjs/quickjs.h +39 -25
- data/ext/quickjsrb/quickjsrb.c +9 -10
- data/lib/quickjs/version.rb +1 -1
- metadata +4 -4
- data/ext/quickjsrb/quickjs/libbf.c +0 -8475
- data/ext/quickjsrb/quickjs/libbf.h +0 -535
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b35606f03fd2d506d2f460873000dcfd75595a2639b4d921ed6f8d76e4fff118
|
4
|
+
data.tar.gz: 3c42d67e4e6d57936a34e5ee93669722e5187f7f8b389fa789798fd3ec37abe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff5cc1f531fe2c7c5ecc098a024fd6fe4ca62088565e2d6fe46be77e0aeea7db97eba84c1bfb2e032628e60805346f1f6ffafa885287a5c67e553e790668b7c2
|
7
|
+
data.tar.gz: 1a4c6ae31c835475f4146531e7d19e08d5542331e37541832010a920b6510c27cc6512ef119c70a310d11786b535f2f71891f538e9a80a275afadf52c462bd9e
|
data/ext/quickjsrb/extconf.rb
CHANGED
@@ -5,8 +5,8 @@ require 'mkmf'
|
|
5
5
|
$VPATH << "$(srcdir)/quickjs"
|
6
6
|
|
7
7
|
$srcs = [
|
8
|
+
'dtoa.c',
|
8
9
|
'libunicode.c',
|
9
|
-
'libbf.c',
|
10
10
|
'libregexp.c',
|
11
11
|
'cutils.c',
|
12
12
|
'quickjs.c',
|
@@ -37,9 +37,7 @@ else
|
|
37
37
|
end
|
38
38
|
|
39
39
|
append_cflags('-fwrapv')
|
40
|
-
|
41
|
-
#$defs.push('-DCONFIG_BIGNUM')
|
42
|
-
$CFLAGS << ' ' << '-D_GNU_SOURCE -DCONFIG_VERSION=\"2024-02-14\" -DCONFIG_BIGNUM'
|
40
|
+
$CFLAGS << ' ' << '-D_GNU_SOURCE -DCONFIG_VERSION=\"2024-02-14\"'
|
43
41
|
|
44
42
|
abort('could not find quickjs.h') unless find_header('quickjs.h')
|
45
43
|
abort('could not find cutils.h') unless find_header('cutils.h')
|
@@ -53,8 +51,8 @@ $warnflags = ''
|
|
53
51
|
|
54
52
|
create_makefile('quickjs/quickjsrb') do |conf|
|
55
53
|
conf.push <<COMPILE_POLYFILL
|
56
|
-
QJS_LIB_OBJS= quickjs.o libregexp.o libunicode.o cutils.o quickjs-libc.o
|
57
|
-
POLYFILL_OPTS=-fno-string-normalize -fno-typedarray -fno-typedarray -fno-eval -fno-proxy -fno-module-loader
|
54
|
+
QJS_LIB_OBJS= quickjs.o dtoa.o libregexp.o libunicode.o cutils.o quickjs-libc.o
|
55
|
+
POLYFILL_OPTS=-fno-string-normalize -fno-typedarray -fno-typedarray -fno-eval -fno-proxy -fno-module-loader
|
58
56
|
|
59
57
|
qjsc: ./qjsc.o $(QJS_LIB_OBJS)
|
60
58
|
$(CC) -g -o $@ $^ -lm -ldl -lpthread
|
@@ -344,4 +344,24 @@ void rqsort(void *base, size_t nmemb, size_t size,
|
|
344
344
|
int (*cmp)(const void *, const void *, void *),
|
345
345
|
void *arg);
|
346
346
|
|
347
|
+
static inline uint64_t float64_as_uint64(double d)
|
348
|
+
{
|
349
|
+
union {
|
350
|
+
double d;
|
351
|
+
uint64_t u64;
|
352
|
+
} u;
|
353
|
+
u.d = d;
|
354
|
+
return u.u64;
|
355
|
+
}
|
356
|
+
|
357
|
+
static inline double uint64_as_float64(uint64_t u64)
|
358
|
+
{
|
359
|
+
union {
|
360
|
+
double d;
|
361
|
+
uint64_t u64;
|
362
|
+
} u;
|
363
|
+
u.u64 = u64;
|
364
|
+
return u.d;
|
365
|
+
}
|
366
|
+
|
347
367
|
#endif /* CUTILS_H */
|