Skip to content

Commit

Permalink
QuickJS 2023-12-09 release (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcharles authored Jan 29, 2024
1 parent 0f3627f commit 0ba225d
Show file tree
Hide file tree
Showing 39 changed files with 6,539 additions and 8,514 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wasmtime-wasi = "16"
wasi-common = "16"
anyhow = "1.0"
once_cell = "1.19"
javy = { path = "crates/javy", version = "2.1.1-alpha.1" }
javy = { path = "crates/javy", version = "2.2.0-alpha.1" }

[profile.release]
lto = true
Expand Down
4 changes: 4 additions & 0 deletions crates/apis/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Updated to 2023-12-09 release of QuickJS.

## [2.1.0] - 2023-09-11

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion crates/apis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "javy-apis"
version = "2.1.1-alpha.1"
version = "2.2.0-alpha.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions crates/javy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Missing documentation for `export_alloc_fns` feature and `alloc` functions.

### Changed

- Updated to 2023-12-09 release of QuickJS.

## [2.1.0] - 2023-09-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion crates/javy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "javy"
version = "2.1.1-alpha.1"
version = "2.2.0-alpha.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions crates/quickjs-wasm-rs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

### Changed

- Make `JSContextRef::wrap_rust_value` private. Similar to
`context::get_rust_value` this function is simply an internal detail.
- Updated to 2023-12-09 release of QuickJS.

## [2.0.1] - 2023-09-11

Expand Down
2 changes: 1 addition & 1 deletion crates/quickjs-wasm-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ categories = ["api-bindings"]

[dependencies]
anyhow = { workspace = true }
quickjs-wasm-sys = { version = "1.1.2-alpha.1", path = "../quickjs-wasm-sys" }
quickjs-wasm-sys = { version = "1.2.0-alpha.1", path = "../quickjs-wasm-sys" }
serde = { version = "1.0", features = ["derive"] }
once_cell = "1.19"

Expand Down
2 changes: 2 additions & 0 deletions crates/quickjs-wasm-sys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Changed: Updated to 2023-12-09 release of QuickJS.

## [1.1.1] - 2023-09-11

- Fixed: Documentation now builds on docs.rs.
Expand Down
2 changes: 1 addition & 1 deletion crates/quickjs-wasm-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quickjs-wasm-sys"
version = "1.1.2-alpha.1"
version = "1.2.0-alpha.1"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
93 changes: 93 additions & 0 deletions crates/quickjs-wasm-sys/patches/quickjsc-patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
51,56c51,55
< // #if defined(EMSCRIPTEN)
< // #define DIRECT_DISPATCH 0
< // #else
< // #define DIRECT_DISPATCH 1
< // #endif
< #define DIRECT_DISPATCH 0
---
> #if defined(EMSCRIPTEN)
> #define DIRECT_DISPATCH 0
> #else
> #define DIRECT_DISPATCH 1
> #endif
64,67c63,66
< // #if !defined(_WIN32)
< // /* define it if printf uses the RNDN rounding mode instead of RNDNA */
< // #define CONFIG_PRINTF_RNDN
< // #endif
---
> #if !defined(_WIN32)
> /* define it if printf uses the RNDN rounding mode instead of RNDNA */
> #define CONFIG_PRINTF_RNDN
> #endif
71,73c70,72
< // #if !defined(EMSCRIPTEN)
< // #define CONFIG_ATOMICS
< // #endif
---
> #if !defined(EMSCRIPTEN)
> #define CONFIG_ATOMICS
> #endif
75c74
< // #if !defined(EMSCRIPTEN)
---
> #if !defined(EMSCRIPTEN)
77,78c76,77
< // #define CONFIG_STACK_CHECK
< // #endif
---
> #define CONFIG_STACK_CHECK
> #endif
1668,1679c1667,1671
< // #if defined(__APPLE__)
< // return malloc_size(ptr);
< // #elif defined(_WIN32)
< // return _msize(ptr);
< // #elif defined(EMSCRIPTEN)
< // return 0;
< // #elif defined(__linux__)
< // return malloc_usable_size(ptr);
< // #else
< // /* change this to `return 0;` if compilation fails */
< // return malloc_usable_size(ptr);
< // #endif
---
> #if defined(__APPLE__)
> return malloc_size(ptr);
> #elif defined(_WIN32)
> return _msize(ptr);
> #elif defined(EMSCRIPTEN)
1680a1673,1678
> #elif defined(__linux__)
> return malloc_usable_size(ptr);
> #else
> /* change this to `return 0;` if compilation fails */
> return malloc_usable_size(ptr);
> #endif
1743,1754c1741,1745
< // #if defined(__APPLE__)
< // malloc_size,
< // #elif defined(_WIN32)
< // (size_t (*)(const void *))_msize,
< // #elif defined(EMSCRIPTEN)
< // NULL,
< // #elif defined(__linux__)
< // (size_t (*)(const void *))malloc_usable_size,
< // #else
< // /* change this to `NULL,` if compilation fails */
< // malloc_usable_size,
< // #endif
---
> #if defined(__APPLE__)
> malloc_size,
> #elif defined(_WIN32)
> (size_t (*)(const void *))_msize,
> #elif defined(EMSCRIPTEN)
1755a1747,1752
> #elif defined(__linux__)
> (size_t (*)(const void *))malloc_usable_size,
> #else
> /* change this to `NULL,` if compilation fails */
> malloc_usable_size,
> #endif
8 changes: 8 additions & 0 deletions crates/quickjs-wasm-sys/quickjs/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2023-12-09:

- added Object.hasOwn, {String|Array|TypedArray}.prototype.at,
{Array|TypedArray}.prototype.findLast{Index}
- BigInt support is enabled even if CONFIG_BIGNUM disabled
- updated to Unicode 15.0.0
- misc bug fixes

2021-03-27:

- faster Array.prototype.push and Array.prototype.unshift
Expand Down
10 changes: 3 additions & 7 deletions crates/quickjs-wasm-sys/quickjs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ prefix=/usr/local
#CONFIG_PROFILE=y
# use address sanitizer
#CONFIG_ASAN=y
# include the code for BigInt/BigFloat/BigDecimal and math mode
# include the code for BigFloat/BigDecimal, math mode and faster large integers
CONFIG_BIGNUM=y

OBJDIR=.obj
Expand Down Expand Up @@ -166,11 +166,10 @@ endif

all: $(OBJDIR) $(OBJDIR)/quickjs.check.o $(OBJDIR)/qjs.check.o $(PROGS)

QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDIR)/libregexp.o $(OBJDIR)/libunicode.o $(OBJDIR)/cutils.o $(OBJDIR)/quickjs-libc.o
QJS_LIB_OBJS=$(OBJDIR)/quickjs.o $(OBJDIR)/libregexp.o $(OBJDIR)/libunicode.o $(OBJDIR)/cutils.o $(OBJDIR)/quickjs-libc.o $(OBJDIR)/libbf.o

QJS_OBJS=$(OBJDIR)/qjs.o $(OBJDIR)/repl.o $(QJS_LIB_OBJS)
ifdef CONFIG_BIGNUM
QJS_LIB_OBJS+=$(OBJDIR)/libbf.o
QJS_OBJS+=$(OBJDIR)/qjscalc.o
endif

Expand Down Expand Up @@ -317,10 +316,7 @@ endif
HELLO_SRCS=examples/hello.js
HELLO_OPTS=-fno-string-normalize -fno-map -fno-promise -fno-typedarray \
-fno-typedarray -fno-regexp -fno-json -fno-eval -fno-proxy \
-fno-date -fno-module-loader
ifdef CONFIG_BIGNUM
HELLO_OPTS+=-fno-bigint
endif
-fno-date -fno-module-loader -fno-bigint

hello.c: $(QJSC) $(HELLO_SRCS)
$(QJSC) -e $(HELLO_OPTS) -o $@ $(HELLO_SRCS)
Expand Down
2 changes: 1 addition & 1 deletion crates/quickjs-wasm-sys/quickjs/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021-03-27
2023-12-09
Loading

0 comments on commit 0ba225d

Please sign in to comment.