Skip to content

Commit e5d2b16

Browse files
committed
Sync with QuickJS v. 2021-03-27
1 parent 35f5a29 commit e5d2b16

27 files changed

Lines changed: 4349 additions & 3997 deletions

Changelog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2021-03-27:
2+
3+
- faster Array.prototype.push and Array.prototype.unshift
4+
- added JS_UpdateStackTop()
5+
- fixed Windows console
6+
- misc bug fixes
7+
8+
2020-11-08:
9+
10+
- improved function parameter initializers
11+
- added std.setenv(), std.unsetenv() and std.getenviron()
12+
- added JS_EvalThis()
13+
- misc bug fixes
14+
115
2020-09-06:
216

317
- added logical assignment operators

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
QuickJS Javascript Engine
2+
3+
Copyright (c) 2017-2021 Fabrice Bellard
4+
Copyright (c) 2017-2021 Charlie Gordon
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
22
# QuickJS Javascript Engine
33
#
4-
# Copyright (c) 2017-2020 Fabrice Bellard
5-
# Copyright (c) 2017-2020 Charlie Gordon
4+
# Copyright (c) 2017-2021 Fabrice Bellard
5+
# Copyright (c) 2017-2021 Charlie Gordon
66
#
77
# Permission is hereby granted, free of charge, to any person obtaining a copy
88
# of this software and associated documentation files (the "Software"), to deal
@@ -53,7 +53,11 @@ CONFIG_BIGNUM=y
5353
OBJDIR=.obj
5454

5555
ifdef CONFIG_WIN32
56+
ifdef CONFIG_M32
5657
CROSS_PREFIX=i686-w64-mingw32-
58+
else
59+
CROSS_PREFIX=x86_64-w64-mingw32-
60+
endif
5761
EXE=.exe
5862
else
5963
CROSS_PREFIX=

TODO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ Optimization ideas:
6666
Test262o: 0/11262 errors, 463 excluded
6767
Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch)
6868

69-
Result: 51/75119 errors, 899 excluded, 570 skipped
70-
Test262 commit: 1c33fdb0ca60fb9d7392403be769ed0d26209132
69+
Result: 35/75280 errors, 909 excluded, 585 skipped
70+
Test262 commit: 31126581e7290f9233c29cefd93f66c6ac78f1c9

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2020-11-08
1+
2021-03-27

doc/quickjs.html

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/quickjs.pdf

74 Bytes
Binary file not shown.

doc/quickjs.texi

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -896,10 +896,11 @@ set the C opaque point with
896896
@code{JS_GetOpaque()}/@code{JS_SetOpaque()}.
897897

898898
When defining a new JS class, it is possible to declare a finalizer
899-
which is called when the object is destroyed. A @code{gc_mark} method
900-
can be provided so that the cycle removal algorithm can find the other
901-
objects referenced by this object. Other methods are available to
902-
define exotic object behaviors.
899+
which is called when the object is destroyed. The finalizer should be
900+
used to release C resources. It is invalid to execute JS code from
901+
it. A @code{gc_mark} method can be provided so that the cycle removal
902+
algorithm can find the other objects referenced by this object. Other
903+
methods are available to define exotic object behaviors.
903904

904905
The Class ID are globally allocated (i.e. for all runtimes). The
905906
JSClass are allocated per @code{JSRuntime}. @code{JS_SetClassProto()}

libbf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Tiny arbitrary precision floating point library
33
*
4-
* Copyright (c) 2017-2020 Fabrice Bellard
4+
* Copyright (c) 2017-2021 Fabrice Bellard
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

libbf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Tiny arbitrary precision floating point library
33
*
4-
* Copyright (c) 2017-2020 Fabrice Bellard
4+
* Copyright (c) 2017-2021 Fabrice Bellard
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,7 @@
2727
#include <stddef.h>
2828
#include <stdint.h>
2929

30-
#if defined(__x86_64__)
30+
#if INTPTR_MAX >= INT64_MAX
3131
#define LIMB_LOG2_BITS 6
3232
#else
3333
#define LIMB_LOG2_BITS 5

0 commit comments

Comments
 (0)