Skip to content

Commit d838e50

Browse files
authored
Update quickjs. (PetterS#2)
* Update quickjs. * Increase version.
1 parent a2680e7 commit d838e50

File tree

6 files changed

+931
-250
lines changed

6 files changed

+931
-250
lines changed

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from setuptools import setup, Extension
55

6-
CONFIG_VERSION = '"2019-07-09"'
6+
CONFIG_VERSION = '2019-07-28'
77
extra_link_args = []
88

99
if sys.platform == "win32":
@@ -17,10 +17,12 @@
1717
import distutils.cygwinccompiler
1818
distutils.cygwinccompiler.get_msvcr = lambda: []
1919
# Escaping works differently.
20-
CONFIG_VERSION = '\\"2019-07-21\\"'
20+
CONFIG_VERSION = f'\\"{CONFIG_VERSION}\\"'
2121
# Make sure that pthreads is linked statically, otherwise we run into problems
2222
# on computers where it is not installed.
2323
extra_link_args = ["-Wl,-Bstatic", "-lpthread"]
24+
else:
25+
CONFIG_VERSION = f'"{CONFIG_VERSION}"'
2426

2527

2628
def get_c_sources(include_headers=False):
@@ -46,7 +48,7 @@ def get_c_sources(include_headers=False):
4648
author_email="[email protected]",
4749
name='quickjs',
4850
url='https://github.com/PetterS/quickjs',
49-
version='1.4.0',
51+
version='1.5.0',
5052
description='Wrapping the quickjs C library.',
5153
long_description=long_description,
5254
packages=["quickjs"],

third-party/libregexp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2511,7 +2511,8 @@ int main(int argc, char **argv)
25112511
printf("usage: %s regexp input\n", argv[0]);
25122512
exit(1);
25132513
}
2514-
bc = lre_compile(&len, error_msg, sizeof(error_msg), argv[1], 0, 0, NULL);
2514+
bc = lre_compile(&len, error_msg, sizeof(error_msg), argv[1],
2515+
strlen(argv[1]), 0, NULL);
25152516
if (!bc) {
25162517
fprintf(stderr, "error: %s\n", error_msg);
25172518
exit(1);

third-party/quickjs-atom.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ DEF(revoke, "revoke")
158158
DEF(async, "async")
159159
DEF(exec, "exec")
160160
DEF(groups, "groups")
161+
DEF(status, "status")
162+
DEF(reason, "reason")
161163
#ifdef CONFIG_BIGNUM
162164
DEF(bigint, "bigint")
163165
DEF(bigfloat, "bigfloat")
@@ -214,6 +216,7 @@ DEF(Map_Iterator, "Map Iterator")
214216
DEF(Set_Iterator, "Set Iterator")
215217
DEF(Array_Iterator, "Array Iterator")
216218
DEF(String_Iterator, "String Iterator")
219+
DEF(RegExp_String_Iterator, "RegExp String Iterator")
217220
DEF(Generator, "Generator")
218221
DEF(Proxy, "Proxy")
219222
DEF(Promise, "Promise")
@@ -236,6 +239,7 @@ DEF(InternalError, "InternalError")
236239
DEF(Symbol_toPrimitive, "Symbol.toPrimitive")
237240
DEF(Symbol_iterator, "Symbol.iterator")
238241
DEF(Symbol_match, "Symbol.match")
242+
DEF(Symbol_matchAll, "Symbol.matchAll")
239243
DEF(Symbol_replace, "Symbol.replace")
240244
DEF(Symbol_search, "Symbol.search")
241245
DEF(Symbol_split, "Symbol.split")

third-party/quickjs-opcode.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ DEF( push_false, 1, 0, 1, none)
7575
DEF( push_true, 1, 0, 1, none)
7676
DEF( object, 1, 0, 1, none)
7777
DEF( var_object, 1, 0, 1, none)
78-
DEF( this_func, 1, 0, 1, none) /* only used at the start of a function */
79-
DEF( arguments, 2, 0, 1, none) /* only used at the start of a function */
78+
DEF( special_object, 2, 0, 1, u8) /* only used at the start of a function */
8079
DEF( rest, 3, 0, 1, u16) /* only used at the start of a function */
81-
DEF( new_target, 1, 0, 1, none) /* only used at the start of a function */
82-
DEF( home_object, 1, 0, 1, none) /* only used at the start of a function */
8380

8481
DEF( drop, 1, 1, 0, none) /* a -> */
8582
DEF( nip, 1, 2, 1, none) /* a b -> b */
@@ -120,6 +117,7 @@ DEF( regexp, 1, 2, 1, none) /* create a RegExp object from the pattern a
120117
bytecode string */
121118
DEF( get_super_ctor, 1, 1, 1, none)
122119
DEF( get_super, 1, 1, 1, none)
120+
DEF( import, 1, 1, 1, none) /* dynamic module import */
123121

124122
DEF( check_var, 5, 0, 1, atom) /* check if a variable exists */
125123
DEF( get_var_undef, 5, 0, 1, atom) /* push undefined if the variable does not exist */

0 commit comments

Comments
 (0)