Skip to content

Commit d4ddda5

Browse files
committed
Update quickjs
1 parent 0b9a943 commit d4ddda5

File tree

7 files changed

+5508
-5526
lines changed

7 files changed

+5508
-5526
lines changed

android-test/src/main/java/com/hippo/quickjs/android/test/Tester.kt

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ class Tester(
144144
runTest("qjsbn", "tests/test_loop.js")
145145
// tmpfile returns null
146146
runTest("qjsbn", "-m tests/test_std.js")
147-
// Failed. Might be related to libbf
148147
runTest("qjsbn", "--qjscalc tests/test_bignum.js")
149148
}
150149

quickjs/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set(BN_FLAGS -DCONFIG_BIGNUM)
1818

1919
set(QJS_LIB_SOURCES
2020
patched/quickjs.c
21-
patched/libregexp.c
21+
quickjs/libregexp.c
2222
quickjs/libunicode.c
2323
quickjs/cutils.c
2424
quickjs/quickjs-libc.c

quickjs/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
task patchQuickJS(type: com.hippo.quickjs.android.PatchTask) {
18-
from = [file("${projectDir}/quickjs/quickjs.c"), file("${projectDir}/quickjs/libregexp.c")]
18+
from = [file("${projectDir}/quickjs/quickjs.c")]
1919
to = file("${projectDir}/patched")
2020
patch = file("${projectDir}/quickjs.patch")
2121
}

quickjs/qjscalc.c

+3,580-3,581
Large diffs are not rendered by default.

quickjs/quickjs

Submodule quickjs updated 16906 files

quickjs/quickjs.patch

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
diff --git a/libregexp.c b/libregexp.c
2-
index 65f0d1b6..61177efa 100644
3-
--- a/libregexp.c
4-
+++ b/libregexp.c
5-
@@ -2407,7 +2407,7 @@ static intptr_t lre_exec_backtrack(REExecContext *s, uint8_t **capture,
6-
for(;;) {
7-
res = lre_exec_backtrack(s, capture, stack, stack_len,
8-
pc1, cptr, TRUE);
9-
- if (res < 0)
10-
+ if (res == -1)
11-
return res;
12-
if (!res)
13-
break;
141
diff --git a/quickjs.c b/quickjs.c
15-
index 9606455c..78c61318 100644
2+
index 8ee82f45..ba71e9c6 100644
163
--- a/quickjs.c
174
+++ b/quickjs.c
18-
@@ -10046,13 +10046,15 @@ static char *i64toa(char *buf_end, int64_t n, unsigned int base)
5+
@@ -10001,13 +10001,15 @@ static char *i64toa(char *buf_end, int64_t n, unsigned int base)
196
return q;
207
}
218

@@ -32,7 +19,7 @@ index 9606455c..78c61318 100644
3219
if (rounding_mode != FE_TONEAREST)
3320
fesetround(FE_TONEAREST);
3421
*sign = (buf1[0] == '-');
35-
@@ -10130,13 +10132,15 @@ static int js_ecvt(double d, int n_digits, int *decpt, int *sign, char *buf,
22+
@@ -10085,13 +10087,15 @@ static int js_ecvt(double d, int n_digits, int *decpt, int *sign, char *buf,
3623
return n_digits;
3724
}
3825

0 commit comments

Comments
 (0)