Skip to content

Commit

Permalink
Upgraded to V8 9.0.56
Browse files Browse the repository at this point in the history
  • Loading branch information
andreburgaud committed Jan 23, 2021
1 parent cc1ff80 commit ad93268
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 34 deletions.
21 changes: 12 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# First stage build (compile V8)
# ==============================================================================

FROM debian:bullseye-slim as builder
FROM debian:stable-slim as builder

ARG V8_VERSION=latest

Expand All @@ -23,18 +23,21 @@ RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

ENV PATH="/depot_tools:${PATH}"

RUN fetch v8 && \
cd /v8 && \
git checkout ${V8_VERSION} && \
./tools/dev/v8gen.py x64.release -- v8_use_external_startup_data=false && \
ninja -C out.gn/x64.release && \
strip out.gn/x64.release/d8
RUN fetch v8

WORKDIR /v8

RUN gn gen out/x64.release --args='v8_monolithic=true v8_use_external_startup_data=false is_component_build=false is_debug=false target_cpu="x64" use_goma=false goma_dir="None" v8_enable_backtrace=true v8_enable_disassembler=true v8_enable_object_print=true v8_enable_verify_heap=true'

RUN ninja -C out/x64.release d8

RUN strip out/x64.release/d8

# ==============================================================================
# Second stage build
# ==============================================================================

FROM debian:bullseye-slim
FROM debian:stable-slim

ARG V8_VERSION=latest
ENV V8_VERSION=$V8_VERSION
Expand All @@ -48,7 +51,7 @@ RUN apt-get update && apt-get upgrade -yqq && \

WORKDIR /v8

COPY --from=builder /v8/out.gn/x64.release/d8 ./
COPY --from=builder /v8/out/x64.release/d8 ./

COPY vimrc /root/.vimrc

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TAG:=8.3.30
TAG:=9.0.56
IMAGE:=andreburgaud/d8

default: help
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ $ docker pull andreburgaud/d8
## V8 Enhanced Shell

```
$ docker run --rm -it -v $PWD/examples:/examples/ andreburgaud/d8 shell
Options: --harmony --harmony-shipping --harmony-private-methods
--harmony-regexp-sequence --harmony-weak-refs --harmony-intl-segmenter
--harmony-namespace-exports --harmony-sharedarraybuffer --harmony-import-meta
--harmony-dynamic-import
$ docker run --rm -it andreburgaud/d8:9.0.56 shell
Options: --harmony --harmony-shipping --harmony-top-level-await --harmony-intl-dateformat-day-period
--harmony-sharedarraybuffer --harmony-atomics --harmony-weak-refs --harmony-string-replaceall
--harmony-logical-assignment --harmony-atomics-waitasync --harmony-relative-indexing-methods
Use quit() or Ctrl-D (i.e. EOF) to exit the D8 Shell
V8 version 8.3.30
V8 version 9.0.0 (candidate)
d8>
```

Expand Down Expand Up @@ -71,21 +70,22 @@ d8>

When ECMAScript 4 (ES4) was abandoned in 2008, some of its features were rolled into a project codenamed ECMAScript Harmony. ES6 later renamed ES2015 was the first "ECMAScript Harmony" specification and is also known as "ES6 Harmony". The V8 harmony options enable specific features that may not yet be part of the default engine features.

### Harmony Flags with Version 8.x
### Harmony Flags with Version 9.x

The following flags are enabled when starting the D8 repl `docker run --rm -it andreburgaud/d8 shell`:

```
--harmony (enable all completed harmony features)
--harmony-shipping (enable all shipped harmony features)
--harmony-private-methods (enable "harmony private methods in class literals" (in progress))
--harmony-regexp-sequence (enable "RegExp Unicode sequence properties" (in progress))
--harmony-weak-refs (enable "harmony weak references" (in progress))
--harmony-intl-segmenter (enable "Intl.Segmenter")
--harmony-namespace-exports (enable "harmony namespace exports (export * as foo from 'bar')")
--harmony-sharedarraybuffer (enable "harmony sharedarraybuffer")
--harmony-import-meta (enable "harmony import.meta property")
--harmony-dynamic-import (enable "harmony dynamic import")
--harmony (enable all completed harmony features)
--harmony-shipping (enable all shipped harmony features)
--harmony-top-level-await (enable "harmony top level await")
--harmony-intl-dateformat-day-period (enable "Add dayPeriod option to DateTimeFormat")
--harmony-sharedarraybuffer (enable "harmony sharedarraybuffer")
--harmony-atomics (enable "harmony Atomics.waitAsync")
--harmony-weak-refs (enable "harmony weak references")
--harmony-string-replaceall (enable "harmony String.prototype.replaceAll")
--harmony-logical-assignment (enable "harmony logical assignment")
--harmony-atomics-waitasync (enable "harmony Atomics.waitAsync")
--harmony-relative-indexing-methods (enable "harmony relative indexing methods")
```

## Help
Expand Down
15 changes: 8 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ start_d8() {
start_d8_shell() {
OPTIONS=(--harmony
--harmony-shipping
--harmony-private-methods
--harmony-regexp-sequence
--harmony-weak-refs
--harmony-intl-segmenter
--harmony-namespace-exports
--harmony-top-level-await
--harmony-intl-dateformat-day-period
--harmony-sharedarraybuffer
--harmony-import-meta
--harmony-dynamic-import)
--harmony-atomics
--harmony-weak-refs
--harmony-string-replaceall
--harmony-logical-assignment
--harmony-atomics-waitasync
--harmony-relative-indexing-methods)

echo -e "\e[93mOptions\e[39m: ${OPTIONS[*]} $*"
echo -e "\e[93mUse quit() or Ctrl-D (i.e. EOF) to exit the D8 Shell\e[39m"
Expand Down

0 comments on commit ad93268

Please sign in to comment.