From 54a4f2907ea606ed1eacea9f891a1617ad75becb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 17 Nov 2023 10:35:52 +0100 Subject: [PATCH] Refactor build system to use CMake only --- .github/workflows/ci.yml | 159 +++---------- CMakeLists.txt | 11 + Makefile | 475 ++++----------------------------------- test262o.conf | 410 --------------------------------- test262o_errors.txt | 0 tests/test_worker.js | 5 +- 6 files changed, 85 insertions(+), 975 deletions(-) delete mode 100644 test262o.conf delete mode 100644 test262o_errors.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 617bccd..0fa8b00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,38 +27,24 @@ jobs: submodules: true - name: build run: | - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.buildType}} .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_TYPE=${{matrix.buildType}} - name: stats run: | - ./build/qjs -qd + make stats - name: test run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test - name: test 262 if: ${{ matrix.buildType == 'Release' }} run: | - time ./build/run-test262 -m -c test262.conf -a + time make test262 linux-examples: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DBUILD_EXAMPLES=ON -DCMAKE_VERBOSE_MAKEFILE=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_EXAMPLES=ON - name: test run: | ldd build/hello @@ -79,15 +65,11 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DBUILD_SHARED_LIBS=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_SHARED_LIBS=ON ldd build/qjs - name: stats run: | - ./build/qjs -qd + make stats linux-asan: runs-on: ubuntu-latest steps: @@ -96,27 +78,17 @@ jobs: submodules: true - name: build run: | - mkdir build - cd build - cmake -DCONFIG_ASAN=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make CONFIG_ASAN=ON - name: test env: ASAN_OPTIONS: halt_on_error=1 run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test - name: test 262 env: ASAN_OPTIONS: halt_on_error=1 run: | - time ./build/run-test262 -m -c test262.conf -a + time make test262 linux-msan: runs-on: ubuntu-latest steps: @@ -127,22 +99,12 @@ jobs: env: CC: clang run: | - mkdir build - cd build - cmake -DCONFIG_MSAN=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make CONFIG_MSAN=ON - name: test env: MSAN_OPTIONS: halt_on_error=1 run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test linux-ubsan: runs-on: ubuntu-latest steps: @@ -151,27 +113,17 @@ jobs: submodules: true - name: build run: | - mkdir build - cd build - cmake -DCONFIG_UBSAN=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make CONFIG_UBSAN=ON - name: test env: UBSAN_OPTIONS: halt_on_error=1 run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test - name: test 262 env: UBSAN_OPTIONS: halt_on_error=1 run: | - time ./build/run-test262 -m -c test262.conf -a + time make test262 macos: runs-on: macos-latest @@ -183,34 +135,20 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.buildType}} .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_TYPE=${{matrix.buildType}} - name: stats run: | - ./build/qjs -qd + make stats - name: test run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test macos-examples: runs-on: macos-latest steps: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DBUILD_EXAMPLES=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_EXAMPLES=ON - name: test run: | otool -L build/hello @@ -231,59 +169,35 @@ jobs: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DBUILD_SHARED_LIBS=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_SHARED_LIBS=ON otool -L build/qjs - name: stats run: | - ./build/qjs -qd + make stats macos-asan: runs-on: macos-latest steps: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DCONFIG_ASAN=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make CONFIG_ASAN=ON - name: test env: ASAN_OPTIONS: halt_on_error=1 run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test macos-ubsan: runs-on: macos-latest steps: - uses: actions/checkout@v3 - name: build run: | - mkdir build - cd build - cmake -DCONFIG_UBSAN=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make CONFIG_UBSAN=ON - name: test env: UBSAN_OPTIONS: halt_on_error=1 run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js - ./build/qjs tests/test_worker.js + make test windows-mingw: runs-on: windows-latest @@ -312,22 +226,13 @@ jobs: toolchain:p - name: build run: | - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.buildType}} .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_TYPE=${{matrix.buildType}} - name: stats run: | - ./build/qjs -qd + make stats - name: test run: | - ./build/qjs tests/test_bigint.js - ./build/qjs tests/test_closure.js - ./build/qjs tests/test_language.js - ./build/qjs tests/test_builtin.js - ./build/qjs tests/test_loop.js - ./build/qjs tests/test_std.js + make test windows-mingw-shared: runs-on: windows-latest defaults: @@ -347,12 +252,8 @@ jobs: toolchain:p - name: build run: | - mkdir build - cd build - cmake -DBUILD_SHARED_LIBS=ON .. - cd .. - cmake --build build -j$(getconf _NPROCESSORS_ONLN) + make BUILD_SHARED_LIBS=ON ldd build/qjs - name: stats run: | - ./build/qjs -qd + make stats diff --git a/CMakeLists.txt b/CMakeLists.txt index a480b58..90e83e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -191,6 +191,17 @@ target_compile_definitions(run-test262 PRIVATE ${qjs_defines}) target_link_libraries(run-test262 ${qjs_libs}) +# Unicode generator +# + +add_executable(unicode_gen EXCLUDE_FROM_ALL + cutils.c + libunicode.c + unicode_gen.c +) +target_compile_definitions(unicode_gen PRIVATE ${qjs_defines}) + + # Examples # diff --git a/Makefile b/Makefile index 966a1c7..ae37d2b 100644 --- a/Makefile +++ b/Makefile @@ -24,456 +24,63 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -ifeq ($(shell uname -s),Darwin) -CONFIG_DARWIN=y -endif -# Windows cross compilation from Linux -#CONFIG_WIN32=y -# Windows compilation with MinGW -#CONFIG_MINGW=y -# use link time optimization (smaller and faster executables but slower build) -# XXX(bnoordhuis) disabled because of slow build times -#CONFIG_LTO=y -# consider warnings as errors (for development) -#CONFIG_WERROR=y -# force 32 bit build for some utilities -#CONFIG_M32=y +BUILD_DIR=build +BUILD_TYPE?=Release +JOBS?=$(shell getconf _NPROCESSORS_ONLN) -ifdef CONFIG_DARWIN -# use clang instead of gcc -CONFIG_CLANG=y -CONFIG_DEFAULT_AR=y -endif +QJS=$(BUILD_DIR)/qjs +RUN262=$(BUILD_DIR)/run-test262 -# installation directory -prefix=/usr/local -# use the gprof profiler -#CONFIG_PROFILE=y -# use address sanitizer -#CONFIG_ASAN=y -# use memory sanitizer -#CONFIG_MSAN=y -# use UB sanitizer -#CONFIG_UBSAN=y +all: build -OBJDIR=.obj +build: $(BUILD_DIR)/CMakeCache.txt + cmake --build $(BUILD_DIR) -j $(JOBS) -ifdef CONFIG_WIN32 - ifdef CONFIG_M32 - CROSS_PREFIX=i686-w64-mingw32- - else - CROSS_PREFIX=x86_64-w64-mingw32- - endif - EXE=.exe -else ifdef CONFIG_MINGW - EXE=.exe -else - CROSS_PREFIX= - EXE= -endif -ifdef CONFIG_CLANG - HOST_CC=clang - CC=$(CROSS_PREFIX)clang - CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d - CFLAGS += -Wextra - CFLAGS += -Wno-sign-compare - CFLAGS += -Wno-missing-field-initializers - CFLAGS += -Wundef -Wuninitialized - CFLAGS += -Wunused -Wno-unused-parameter - CFLAGS += -Wwrite-strings - CFLAGS += -Wchar-subscripts -funsigned-char - CFLAGS += -MMD -MF $(OBJDIR)/$(@F).d - ifdef CONFIG_DEFAULT_AR - AR=$(CROSS_PREFIX)ar - else - ifdef CONFIG_LTO - AR=$(CROSS_PREFIX)llvm-ar - else - AR=$(CROSS_PREFIX)ar - endif - endif -else ifdef CONFIG_MINGW - HOST_CC=gcc - CC=gcc - CFLAGS=-g -Wall - CFLAGS += -Wno-array-bounds -Wno-format-truncation - AR=ar -else - HOST_CC=gcc - CC=$(CROSS_PREFIX)gcc - CFLAGS=-g -Wall -MMD -MF $(OBJDIR)/$(@F).d - CFLAGS += -Wno-array-bounds -Wno-format-truncation - ifdef CONFIG_LTO - AR=$(CROSS_PREFIX)gcc-ar - else - AR=$(CROSS_PREFIX)ar - endif -endif -STRIP=$(CROSS_PREFIX)strip -ifdef CONFIG_WERROR -CFLAGS+=-Werror -endif -DEFINES:=-D_GNU_SOURCE -ifdef CONFIG_WIN32 -DEFINES+=-D__USE_MINGW_ANSI_STDIO # for standard snprintf behavior -endif -ifdef CONFIG_MINGW -DEFINES+=-D__USE_MINGW_ANSI_STDIO # for standard snprintf behavior -endif +$(BUILD_DIR)/CMakeCache.txt: + @mkdir -p $(BUILD_DIR) + cd $(BUILD_DIR); cmake ../ -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -CFLAGS+=$(DEFINES) -CFLAGS_DEBUG=$(CFLAGS) -O0 -CFLAGS_SMALL=$(CFLAGS) -Os -CFLAGS_OPT=$(CFLAGS) -O2 -CFLAGS_NOLTO:=$(CFLAGS_OPT) -LDFLAGS=-g -ifdef CONFIG_LTO -CFLAGS_SMALL+=-flto -CFLAGS_OPT+=-flto -LDFLAGS+=-flto -endif -ifdef CONFIG_PROFILE -CFLAGS+=-p -LDFLAGS+=-p -endif -ifdef CONFIG_ASAN -CFLAGS+=-fsanitize=address -fno-sanitize-recover=all -fno-omit-frame-pointer -LDFLAGS+=-fsanitize=address -fno-sanitize-recover=all -fno-omit-frame-pointer -endif -ifdef CONFIG_MSAN -CFLAGS+=-fsanitize=memory -fno-sanitize-recover=all -fno-omit-frame-pointer -LDFLAGS+=-fsanitize=memory -fno-sanitize-recover=all -fno-omit-frame-pointer -endif -ifdef CONFIG_UBSAN -CFLAGS+=-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -LDFLAGS+=-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -endif -ifdef CONFIG_WIN32 -LDEXPORT= -else ifdef CONFIG_MINGW -LDEXPORT= -else -LDEXPORT=-rdynamic -endif - -PROGS=qjs$(EXE) qjsc$(EXE) run-test262 -ifneq ($(CROSS_PREFIX),) -QJSC_CC=gcc -QJSC=./host-qjsc -PROGS+=$(QJSC) -else -QJSC_CC=$(CC) -QJSC=./qjsc$(EXE) -endif -ifdef CONFIG_M32 -PROGS+=qjs32 qjs32_s -endif -PROGS+=libquickjs.a -ifdef CONFIG_LTO -PROGS+=libquickjs.lto.a -endif - -# examples -ifeq ($(CROSS_PREFIX),) -ifndef CONFIG_ASAN -ifndef CONFIG_MSAN -ifndef CONFIG_UBSAN -ifndef CONFIG_MINGW -PROGS+=examples/hello examples/hello_module examples/test_fib -ifndef CONFIG_DARWIN -PROGS+=examples/fib.so examples/point.so -endif -endif -endif -endif -endif -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_OBJS=$(OBJDIR)/qjs.o $(OBJDIR)/repl.o $(QJS_LIB_OBJS) -QJS_LIB_OBJS+=$(OBJDIR)/libbf.o - -HOST_LIBS=-lm -ldl -lpthread -LIBS=-lm -ifndef CONFIG_WIN32 -ifndef CONFIG_MINGW -LIBS+=-ldl -lpthread -endif -endif -LIBS+=$(EXTRA_LIBS) - -$(OBJDIR): - mkdir -p $(OBJDIR) $(OBJDIR)/examples $(OBJDIR)/tests - -qjs$(EXE): $(QJS_OBJS) - $(CC) $(LDFLAGS) $(LDEXPORT) -o $@ $^ $(LIBS) - -qjs-debug$(EXE): $(patsubst %.o, %.debug.o, $(QJS_OBJS)) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - -qjsc$(EXE): $(OBJDIR)/qjsc.o $(QJS_LIB_OBJS) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - -ifneq ($(CROSS_PREFIX),) - -$(QJSC): $(OBJDIR)/qjsc.host.o \ - $(patsubst %.o, %.host.o, $(QJS_LIB_OBJS)) - $(HOST_CC) $(LDFLAGS) -o $@ $^ $(HOST_LIBS) - -endif #CROSS_PREFIX - -QJSC_DEFINES:=-DCONFIG_CC=\"$(QJSC_CC)\" -DCONFIG_PREFIX=\"$(prefix)\" -ifdef CONFIG_LTO -QJSC_DEFINES+=-DCONFIG_LTO -endif -QJSC_HOST_DEFINES:=-DCONFIG_CC=\"$(HOST_CC)\" -DCONFIG_PREFIX=\"$(prefix)\" - -$(OBJDIR)/qjsc.o: CFLAGS+=$(QJSC_DEFINES) -$(OBJDIR)/qjsc.host.o: CFLAGS+=$(QJSC_HOST_DEFINES) - -qjs32: $(patsubst %.o, %.m32.o, $(QJS_OBJS)) - $(CC) -m32 $(LDFLAGS) $(LDEXPORT) -o $@ $^ $(LIBS) - -qjs32_s: $(patsubst %.o, %.m32s.o, $(QJS_OBJS)) - $(CC) -m32 $(LDFLAGS) -o $@ $^ $(LIBS) - @size $@ - -ifdef CONFIG_LTO -LTOEXT=.lto -else -LTOEXT= -endif - -libquickjs$(LTOEXT).a: $(QJS_LIB_OBJS) - $(AR) rcs $@ $^ - -ifdef CONFIG_LTO -libquickjs.a: $(patsubst %.o, %.nolto.o, $(QJS_LIB_OBJS)) - $(AR) rcs $@ $^ -endif # CONFIG_LTO - -repl.c: $(QJSC) repl.js - $(QJSC) -c -o $@ -m repl.js - -ifneq ($(wildcard unicode/UnicodeData.txt),) -$(OBJDIR)/libunicode.o $(OBJDIR)/libunicode.m32.o $(OBJDIR)/libunicode.m32s.o \ - $(OBJDIR)/libunicode.nolto.o: libunicode-table.h - -libunicode-table.h: unicode_gen - ./unicode_gen unicode $@ -endif - -run-test262: $(OBJDIR)/run-test262.o $(QJS_LIB_OBJS) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - -run-test262-debug: $(patsubst %.o, %.debug.o, $(OBJDIR)/run-test262.o $(QJS_LIB_OBJS)) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - -run-test262-32: $(patsubst %.o, %.m32.o, $(OBJDIR)/run-test262.o $(QJS_LIB_OBJS)) - $(CC) -m32 $(LDFLAGS) -o $@ $^ $(LIBS) - -# object suffix order: nolto, [m32|m32s] - -$(OBJDIR)/%.o: %.c | $(OBJDIR) - $(CC) $(CFLAGS_OPT) -c -o $@ $< - -$(OBJDIR)/%.host.o: %.c | $(OBJDIR) - $(HOST_CC) $(CFLAGS_OPT) -c -o $@ $< - -$(OBJDIR)/%.pic.o: %.c | $(OBJDIR) - $(CC) $(CFLAGS_OPT) -fPIC -DJS_SHARED_LIBRARY -c -o $@ $< - -$(OBJDIR)/%.nolto.o: %.c | $(OBJDIR) - $(CC) $(CFLAGS_NOLTO) -c -o $@ $< - -$(OBJDIR)/%.m32.o: %.c | $(OBJDIR) - $(CC) -m32 $(CFLAGS_OPT) -c -o $@ $< - -$(OBJDIR)/%.m32s.o: %.c | $(OBJDIR) - $(CC) -m32 $(CFLAGS_SMALL) -c -o $@ $< - -$(OBJDIR)/%.debug.o: %.c | $(OBJDIR) - $(CC) $(CFLAGS_DEBUG) -c -o $@ $< - -$(OBJDIR)/%.check.o: %.c | $(OBJDIR) - $(CC) $(CFLAGS) -DCONFIG_CHECK_JSVALUE -c -o $@ $< - -regexp_test: libregexp.c libunicode.c cutils.c - $(CC) $(LDFLAGS) $(CFLAGS) -DTEST -o $@ libregexp.c libunicode.c cutils.c $(LIBS) - -unicode_gen: $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o libunicode.c unicode_gen_def.h - $(HOST_CC) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJDIR)/unicode_gen.host.o $(OBJDIR)/cutils.host.o +install: build + cmake --build $(BUILD_DIR) --target install clean: - rm -f repl.c out.c - rm -f *.a *.o *.d *~ unicode_gen regexp_test $(PROGS) - rm -f hello.c test_fib.c - rm -f examples/*.so tests/*.so - rm -rf $(OBJDIR)/ *.dSYM/ qjs-debug - rm -rf run-test262-debug run-test262-32 + cmake --build $(BUILD_DIR) --target clean -install: all - mkdir -p "$(DESTDIR)$(prefix)/bin" - $(STRIP) qjs qjsc - install -m755 qjs qjsc "$(DESTDIR)$(prefix)/bin" - mkdir -p "$(DESTDIR)$(prefix)/lib/quickjs" - install -m644 libquickjs.a "$(DESTDIR)$(prefix)/lib/quickjs" -ifdef CONFIG_LTO - install -m644 libquickjs.lto.a "$(DESTDIR)$(prefix)/lib/quickjs" -endif - mkdir -p "$(DESTDIR)$(prefix)/include/quickjs" - install -m644 quickjs.h quickjs-libc.h "$(DESTDIR)$(prefix)/include/quickjs" +debug: + BUILDTYPE=Debug $(MAKE) -############################################################################### -# examples +distclean: + @rm -rf $(BUILD_DIR) -# example of static JS compilation -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 +stats: build + $(QJS) -qd -hello.c: $(QJSC) $(HELLO_SRCS) - $(QJSC) -e $(HELLO_OPTS) -o $@ $(HELLO_SRCS) +test: build + $(QJS) tests/test_bigint.js + $(QJS) tests/test_closure.js + $(QJS) tests/test_language.js + $(QJS) tests/test_builtin.js + $(QJS) tests/test_loop.js + $(QJS) tests/test_std.js + $(QJS) tests/test_worker.js -ifdef CONFIG_M32 -examples/hello: $(OBJDIR)/hello.m32s.o $(patsubst %.o, %.m32s.o, $(QJS_LIB_OBJS)) - $(CC) -m32 $(LDFLAGS) -o $@ $^ $(LIBS) -else -examples/hello: $(OBJDIR)/hello.o $(QJS_LIB_OBJS) - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -endif +test262: build + $(RUN262) -m -c test262.conf -a -# example of static JS compilation with modules -HELLO_MODULE_SRCS=examples/hello_module.js -HELLO_MODULE_OPTS=-fno-string-normalize -fno-map -fno-typedarray \ - -fno-typedarray -fno-regexp -fno-json -fno-eval -fno-proxy \ - -fno-date -m -examples/hello_module: $(QJSC) libquickjs$(LTOEXT).a $(HELLO_MODULE_SRCS) - $(QJSC) $(HELLO_MODULE_OPTS) -o $@ $(HELLO_MODULE_SRCS) +test262-update: build + $(RUN262) -u -c test262.conf -a -# use of an external C module (static compilation) +test262-check: build + $(RUN262) -m -c test262.conf -E -a -test_fib.c: $(QJSC) examples/test_fib.js - $(QJSC) -e -M examples/fib.so,fib -m -o $@ examples/test_fib.js +microbench: build + $(QJS) tests/microbench.js -examples/test_fib: $(OBJDIR)/test_fib.o $(OBJDIR)/examples/fib.o libquickjs$(LTOEXT).a - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) +unicode_gen: $(BUILD_DIR)/CMakeCache.txt + cmake --build $(BUILD_DIR) --target unicode_gen -examples/fib.so: $(OBJDIR)/examples/fib.pic.o - $(CC) $(LDFLAGS) -shared -o $@ $^ +libunicode-table.h: unicode_gen + $(BUILD_DIR)/unicode_gen unicode $@ -examples/point.so: $(OBJDIR)/examples/point.pic.o - $(CC) $(LDFLAGS) -shared -o $@ $^ - -############################################################################### -# documentation - -DOCS=doc/quickjs.pdf doc/quickjs.html - -build_doc: $(DOCS) - -clean_doc: - rm -f $(DOCS) - -doc/%.pdf: doc/%.texi - texi2pdf --clean -o $@ -q $< - -doc/%.html.pre: doc/%.texi - makeinfo --html --no-headers --no-split --number-sections -o $@ $< - -doc/%.html: doc/%.html.pre - sed -e 's||\n|' < $< > $@ - -############################################################################### -# tests - -ifndef CONFIG_MINGW -ifndef CONFIG_DARWIN -test: tests/bjson.so examples/point.so -endif -endif -ifdef CONFIG_M32 -test: qjs32 -endif - -test: qjs - ./qjs tests/test_bigint.js - ./qjs tests/test_closure.js - ./qjs tests/test_language.js - ./qjs tests/test_builtin.js - ./qjs tests/test_loop.js - ./qjs tests/test_std.js -ifndef CONFIG_MINGW - ./qjs tests/test_worker.js -endif -ifndef CONFIG_MINGW -ifndef CONFIG_DARWIN - ./qjs tests/test_bjson.js - ./qjs examples/test_point.js -endif -endif -ifdef CONFIG_M32 - ./qjs32 tests/test_closure.js - ./qjs32 tests/test_language.js - ./qjs32 tests/test_builtin.js - ./qjs32 tests/test_loop.js - ./qjs32 tests/test_std.js - ./qjs32 tests/test_worker.js - ./qjs32 tests/test_bigint.js -endif - -stats: qjs qjs32 - ./qjs -qd - ./qjs32 -qd - -microbench: qjs - ./qjs tests/microbench.js - -microbench-32: qjs32 - ./qjs32 tests/microbench.js - -# ES5 tests (obsolete) -test2o: run-test262 - time ./run-test262 -m -c test262o.conf - -test2o-32: run-test262-32 - time ./run-test262-32 -m -c test262o.conf - -test2o-update: run-test262 - ./run-test262 -u -c test262o.conf - -# Test262 tests -test2-default: run-test262 - time ./run-test262 -m -c test262.conf - -test2: run-test262 - time ./run-test262 -m -c test262.conf -a - -test2-32: run-test262-32 - time ./run-test262-32 -m -c test262.conf -a - -test2-update: run-test262 - ./run-test262 -u -c test262.conf -a - -test2-check: run-test262 - time ./run-test262 -m -c test262.conf -E -a - -testall: all test microbench test2o test2 - -testall-32: all test-32 microbench-32 test2o-32 test2-32 - -testall-complete: testall testall-32 - -bench-v8: qjs - make -C tests/bench-v8 - ./qjs -d tests/bench-v8/combined.js - -tests/bjson.so: $(OBJDIR)/tests/bjson.pic.o - $(CC) $(LDFLAGS) -shared -o $@ $^ $(LIBS) - --include $(wildcard $(OBJDIR)/*.d) +.PHONY: all build debug install clean distclean stats test test262 test262-update test262-check microbench unicode_gen diff --git a/test262o.conf b/test262o.conf deleted file mode 100644 index 669dead..0000000 --- a/test262o.conf +++ /dev/null @@ -1,410 +0,0 @@ -[config] -# general settings for test262 ES5 version - -# framework style: old, new -style=old - -# handle tests tagged as @noStrict: yes, no, skip -nostrict=yes - -# handle tests tagged as @strictOnly: yes, no, skip -strict=yes - -# test mode: default, default-nostrict, default-strict, strict, nostrict, both, all -mode=default - -# output error messages: yes, no -verbose=yes - -# load harness files this directory -harnessdir=test262o/test/harness - -# name of the error file for known errors -errorfile=test262o_errors.txt - -# exclude tests enumerated in this file -#excludefile=test262o_excluded.txt - -# report test results to this file -reportfile=test262o_report.txt - -# enumerate tests from this directory -testdir=test262o/test/suite - -[exclude] -# list excluded tests and directories here - -# intl not supported -test262o/test/suite/intl402/ - -# ES6 != ES5: block scoped function definitions allowed in strict mode -test262o/test/suite/bestPractice/Sbp_A1_T1.js -test262o/test/suite/bestPractice/Sbp_A2_T1.js -test262o/test/suite/bestPractice/Sbp_A2_T2.js -test262o/test/suite/bestPractice/Sbp_A3_T1.js -test262o/test/suite/bestPractice/Sbp_A3_T2.js -test262o/test/suite/bestPractice/Sbp_A4_T1.js -test262o/test/suite/bestPractice/Sbp_A4_T2.js -test262o/test/suite/bestPractice/Sbp_A5_T2.js - -# ES6 != ES5: `y={x};` is shorthand for `y={x:x}` -test262o/test/suite/ch12/12.1/S12.1_A4_T2.js -test262o/test/suite/ch12/12.6/12.6.4/S12.6.4_A15.js - -# ES6 != ES5: function length property is configurable -test262o/test/suite/ch11/11.4/11.4.1/11.4.1-5-a-28-s.js -test262o/test/suite/ch13/13.2/13.2-15-1.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.1/S15.1.2.1_A4.2.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A9.2.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A7.2.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.4/S15.1.2.4_A2.2.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.5/S15.1.2.5_A2.2.js -test262o/test/suite/ch15/15.1/15.1.3/15.1.3.1/S15.1.3.1_A5.2.js -test262o/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js -test262o/test/suite/ch15/15.1/15.1.3/15.1.3.3/S15.1.3.3_A5.2.js -test262o/test/suite/ch15/15.1/15.1.3/15.1.3.4/S15.1.3.4_A5.2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js -test262o/test/suite/ch15/15.2/15.2.4/15.2.4.2/S15.2.4.2_A9.js -test262o/test/suite/ch15/15.2/15.2.4/15.2.4.3/S15.2.4.3_A9.js -test262o/test/suite/ch15/15.2/15.2.4/15.2.4.4/S15.2.4.4_A9.js -test262o/test/suite/ch15/15.2/15.2.4/15.2.4.5/S15.2.4.5_A9.js -test262o/test/suite/ch15/15.2/15.2.4/15.2.4.6/S15.2.4.6_A9.js -test262o/test/suite/ch15/15.2/15.2.4/15.2.4.7/S15.2.4.7_A9.js -test262o/test/suite/ch15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.2/S15.3.4.2_A9.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A9.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.4/S15.3.4.4_A9.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js -test262o/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T1.js -test262o/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T2.js -test262o/test/suite/ch15/15.3/15.3.5/S15.3.5.1_A2_T3.js -test262o/test/suite/ch15/15.4/15.4.3/S15.4.3_A2.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.2/S15.4.4.2_A4.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.3/S15.4.4.3_A4.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A4.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A6.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A5.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A6.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A5.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A7.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A5.2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A5.2.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.4/S15.5.4.4_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.5/S15.5.4.5_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.6/S15.5.4.6_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.8/S15.5.4.8_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.9/S15.5.4.9_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.10/S15.5.4.10_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.11/S15.5.4.11_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.12/S15.5.4.12_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.13/S15.5.4.13_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.14/S15.5.4.14_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.15/S15.5.4.15_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.16/S15.5.4.16_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.17/S15.5.4.17_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.18/S15.5.4.18_A9.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.19/S15.5.4.19_A9.js -test262o/test/suite/ch15/15.9/15.9.4/15.9.4.2/S15.9.4.2_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.4/15.9.4.3/S15.9.4.3_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.1/S15.9.5.1_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.2/S15.9.5.2_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.3/S15.9.5.3_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.4/S15.9.5.4_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.5/S15.9.5.5_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.6/S15.9.5.6_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.7/S15.9.5.7_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.8/S15.9.5.8_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.9/S15.9.5.9_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.10/S15.9.5.10_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.11/S15.9.5.11_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.12/S15.9.5.12_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.13/S15.9.5.13_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.14/S15.9.5.14_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.15/S15.9.5.15_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.16/S15.9.5.16_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.17/S15.9.5.17_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.18/S15.9.5.18_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.19/S15.9.5.19_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.20/S15.9.5.20_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.21/S15.9.5.21_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.22/S15.9.5.22_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.23/S15.9.5.23_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.24/S15.9.5.24_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.25/S15.9.5.25_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.26/S15.9.5.26_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.27/S15.9.5.27_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.28/S15.9.5.28_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.29/S15.9.5.29_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.30/S15.9.5.30_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.31/S15.9.5.31_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.32/S15.9.5.32_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.33/S15.9.5.33_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.34/S15.9.5.34_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.35/S15.9.5.35_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.36/S15.9.5.36_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.37/S15.9.5.37_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.38/S15.9.5.38_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.39/S15.9.5.39_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.40/S15.9.5.40_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.41/S15.9.5.41_A3_T2.js -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.42/S15.9.5.42_A3_T2.js -test262o/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A9.js -test262o/test/suite/ch15/15.10/15.10.6/15.10.6.3/S15.10.6.3_A9.js -test262o/test/suite/ch15/15.10/15.10.6/15.10.6.4/S15.10.6.4_A9.js - -# ES6 != ES5: object literals may have duplicates -test262o/test/suite/ch11/11.1/11.1.5/11.1.5-4-4-a-1-s.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-1.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-b-2.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-1.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-c-2.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-1.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-2.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-3.js -test262o/test/suite/ch11/11.1/11.1.5/11.1.5_4-4-d-4.js - -# ES6 != ES5: Date.prototype is no longer an instance of Date -test262o/test/suite/ch15/15.9/15.9.5/15.9.5.40/15.9.5.40_1.js - -# ES6 != ES5: Object.getPrototypeOf converts argument to object -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js - -# ES6 != ES5: Object.getPrototypeOf(NativeError) -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js - -# ES6 != ES5: Object.getOwnPropertyDescriptor converts argument to object -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js - -# ES6 != ES5: Object.getOwnPropertyNames converts argument to object -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js - -# ES6 != ES5: Object.seal accepts all types -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js - -# ES6 != ES5: Object.freeze accepts all types -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js - -# ES6 != ES5: Object.preventExtensions accepts all types -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js - -# ES6 != ES5: Object.isSealed accepts all types -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js - -# ES6 != ES5: Object.isFrozen accepts all types -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js - -# ES6 != ES5: Object.isExtensible accepts all types -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js - -# ES6 != ES5: Object.keys converts argument to object -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js - -# ES6 != ES5: source and other properties of RegExp.prototype are not own properties -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js - -# ES6 != ES5: String numeric object properties are enumerated first -test262o/test/suite/ch15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js - -# ES6: new RegExp(regex, flags) is valid -test262o/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T1.js -test262o/test/suite/ch15/15.10/15.10.3/S15.10.3.1_A2_T2.js -test262o/test/suite/ch15/15.10/15.10.4/15.10.4.1/15.10.4.1-1.js -test262o/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T1.js -test262o/test/suite/ch15/15.10/15.10.4/S15.10.4.1_A2_T2.js - -# ES6 != ES5: RegExp.prototype.test behavior -test262o/test/suite/ch15/15.10/15.10.6/15.10.6.2/S15.10.6.2_A5_T3.js - -# ES6 != ES5: source, global, ignoreCase, multiline, lastIndex are not data properties -# of RegExp objects and RegExp.prototype is not a RegExp object -test262o/test/suite/ch15/15.10/15.10.6/15.10.6.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A8.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A9.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.1/S15.10.7.1_A10.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A8.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A9.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.2/S15.10.7.2_A10.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A8.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A9.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.3/S15.10.7.3_A10.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A8.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A9.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.4/S15.10.7.4_A10.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js -test262o/test/suite/ch15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js - -# ES6 != ES5: Error.prototype is a normal object -test262o/test/suite/ch15/15.11/15.11.4/S15.11.4_A2.js - -# ES6 different ToLength() semantics -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.5/S15.4.4.5_A4_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A2_T2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T1.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.6/S15.4.4.6_A3_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A2_T2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T1.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.7/S15.4.4.7_A4_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A3_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.9/S15.4.4.9_A3_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.11/S15.4.4.11_A4_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T1.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.12/S15.4.4.12_A3_T3.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.13/S15.4.4.13_A3_T2.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js - -# ES6 different ToLength() semantics causes near infinite runtime -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js -test262o/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js - -# ES6 arguments/caller changes -test262o/test/suite/ch10/10.6/10.6-13-b-1-s.js -test262o/test/suite/ch10/10.6/10.6-13-b-2-s.js -test262o/test/suite/ch10/10.6/10.6-13-b-3-s.js -test262o/test/suite/ch10/10.6/10.6-14-1-s.js -test262o/test/suite/ch10/10.6/10.6-14-b-1-s.js -test262o/test/suite/ch10/10.6/10.6-14-b-4-s.js -test262o/test/suite/ch13/13.2/13.2-29-s.js -test262o/test/suite/ch13/13.2/13.2-30-s.js -test262o/test/suite/ch13/13.2/13.2-31-s.js -test262o/test/suite/ch13/13.2/13.2-32-s.js -test262o/test/suite/ch13/13.2/13.2-33-s.js -test262o/test/suite/ch13/13.2/13.2-34-s.js -test262o/test/suite/ch13/13.2/13.2-35-s.js -test262o/test/suite/ch13/13.2/13.2-36-s.js -test262o/test/suite/ch13/13.2/S13.2.3_A1.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js -test262o/test/suite/ch15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js - -# u180e is no longer considered as a space -test262o/test/suite/ch09/9.3/9.3.1/S9.3.1_A2.js -test262o/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T1.js -test262o/test/suite/ch09/9.3/9.3.1/S9.3.1_A3_T2.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.2/S15.1.2.2_A2_T10.js -test262o/test/suite/ch15/15.1/15.1.2/15.1.2.3/S15.1.2.3_A2_T10.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js -test262o/test/suite/ch15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js -test262o/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A1_T1.js -test262o/test/suite/ch15/15.10/15.10.2/15.10.2.12/S15.10.2.12_A2_T1.js - -# E6 eval return value is different -test262o/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.js -test262o/test/suite/ch12/12.6/12.6.3/S12.6.3_A9.1.js - -# ECMA 2019 optional-catch-binding feature allows try{}catch{} -test262o/test/suite/ch12/12.14/S12.14_A16_T4.js - -# Syntax error instead of ReferenceError in ES2020 -test262o/test/suite/ch11/11.13/11.13.1/11.13.1-1-1.js -test262o/test/suite/ch11/11.13/11.13.1/11.13.1-1-2.js -test262o/test/suite/ch11/11.13/11.13.1/11.13.1-1-3.js -test262o/test/suite/ch11/11.13/11.13.1/11.13.1-1-4.js - -[tests] -# list test files or use config.testdir diff --git a/test262o_errors.txt b/test262o_errors.txt deleted file mode 100644 index e69de29..0000000 diff --git a/tests/test_worker.js b/tests/test_worker.js index 4b52bf8..818739e 100644 --- a/tests/test_worker.js +++ b/tests/test_worker.js @@ -58,5 +58,6 @@ function test_worker() }; } - -test_worker(); +if (os.platform !== 'win32') { + test_worker(); +}