├── app ├── .gitignore ├── src │ └── main │ │ ├── assets │ │ ├── test.js │ │ ├── sonic.kbc1 │ │ ├── test.kbc1 │ │ └── JsEngineSonicBridge.js │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── themes.xml │ │ │ └── colors.xml │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ └── drawable │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ └── com │ │ │ └── shiqi │ │ │ └── testquickjs │ │ │ ├── ui │ │ │ └── theme │ │ │ │ ├── Color.kt │ │ │ │ ├── Type.kt │ │ │ │ └── Theme.kt │ │ │ └── MainActivity.kt │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── quickjs-android ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── c │ │ ├── java-object.h │ │ ├── java-method.h │ │ ├── java-helper.c │ │ ├── java-object.c │ │ └── java-helper.h │ │ └── java │ │ └── com │ │ └── shiqi │ │ └── quickjs │ │ ├── PromiseExecutor.java │ │ ├── JSFunctionCallback.java │ │ ├── JSNull.java │ │ ├── JSInternal.java │ │ ├── JSSymbol.java │ │ ├── JSUndefined.java │ │ ├── JSDataException.java │ │ ├── JSString.java │ │ ├── JSArray.java │ │ ├── JSBoolean.java │ │ ├── JSEvaluationException.java │ │ ├── JavaType.java │ │ ├── JSValueAdapter.java │ │ ├── JSFunction.java │ │ ├── JSInt.java │ │ ├── JSException.java │ │ ├── JSValue.java │ │ ├── JSNumber.java │ │ ├── TypeAdapter.java │ │ ├── ArrayTypeAdapter.java │ │ ├── JSFloat64.java │ │ ├── JSArrayBuffer.java │ │ ├── NativeCleaner.java │ │ ├── JSRuntime.java │ │ ├── JNIHelper.java │ │ └── JSObject.java ├── proguard-rules.pro ├── CMakeLists.txt └── build.gradle ├── quickjs ├── VERSION ├── .gitattributes ├── examples │ ├── hello.js │ ├── hello_module.js │ ├── test_fib.js │ ├── fib_module.js │ ├── test_point.js │ ├── pi_bigfloat.js │ ├── pi_bigdecimal.js │ ├── fib.c │ └── pi_bigint.js ├── scripts │ ├── ci.sh │ ├── build.sh │ └── test.sh ├── src │ ├── core │ │ ├── misc │ │ │ ├── debug.h │ │ │ └── debug.c │ │ ├── builtins │ │ │ ├── js-json.h │ │ │ ├── js-map.h │ │ │ ├── js-atomics.h │ │ │ ├── js-regexp.h │ │ │ ├── js-boolean.h │ │ │ ├── js-promise.h │ │ │ ├── js-typed-array.h │ │ │ ├── js-closures.h │ │ │ ├── js-symbol.h │ │ │ ├── js-reflect.h │ │ │ ├── js-math.h │ │ │ ├── js-generator.h │ │ │ ├── js-boolean.c │ │ │ ├── js-async-function.h │ │ │ ├── js-number.h │ │ │ ├── js-operator.h │ │ │ ├── js-proxy.h │ │ │ └── js-date.h │ │ ├── memory.h │ │ ├── bytecode.h │ │ ├── malloc.h │ │ ├── ic.h │ │ ├── module.h │ │ ├── base.h │ │ └── exception.h │ └── CMakeLists.txt ├── .gitignore ├── tests │ ├── test_promise_gc_crash.js │ ├── test_worker_module.js │ ├── test_worker.js │ ├── test262.patch │ └── bjson.c ├── unicode_download.sh ├── CMakeLists.txt ├── README.md ├── include │ └── quickjs │ │ ├── libregexp-opcode.h │ │ ├── libregexp.h │ │ ├── list.h │ │ └── libunicode.h ├── quickjs-libc.h ├── TODO ├── release.sh └── Changelog ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitmodules ├── .vscode ├── settings.json └── launch.json ├── .gitignore ├── settings.gradle ├── LICENSE ├── gradle.properties ├── README.md └── gradlew.bat /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /quickjs-android/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /quickjs/VERSION: -------------------------------------------------------------------------------- 1 | 2021-03-27 2 | -------------------------------------------------------------------------------- /quickjs/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf -------------------------------------------------------------------------------- /app/src/main/assets/test.js: -------------------------------------------------------------------------------- 1 | console.log('Hello, World!') -------------------------------------------------------------------------------- /quickjs/examples/hello.js: -------------------------------------------------------------------------------- 1 | console.log("Hello World"); 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | app 3 | -------------------------------------------------------------------------------- /quickjs/scripts/ci.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | 5 | bash scripts/build.sh 6 | bash scripts/test.sh -------------------------------------------------------------------------------- /quickjs-android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/assets/sonic.kbc1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/assets/sonic.kbc1 -------------------------------------------------------------------------------- /app/src/main/assets/test.kbc1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/assets/test.kbc1 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "mimalloc"] 2 | path = quickjs/vendor/mimalloc 3 | url = https://github.com/microsoft/mimalloc.git 4 | branch = v2.1.2 -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenQuickJS/quickjs-android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /quickjs/examples/hello_module.js: -------------------------------------------------------------------------------- 1 | /* example of JS module */ 2 | 3 | import { fib } from "./fib_module.js"; 4 | 5 | console.log("Hello World"); 6 | console.log("fib(10)=", fib(10)); 7 | -------------------------------------------------------------------------------- /quickjs/src/core/misc/debug.h: -------------------------------------------------------------------------------- 1 | #ifdef CONFIG_DEBUG_ON_RELEASE 2 | 3 | #include 4 | #include 5 | 6 | void __internal_debug_log(const char* fmt, ...); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /quickjs/examples/test_fib.js: -------------------------------------------------------------------------------- 1 | /* example of JS module importing a C module */ 2 | 3 | import { fib } from "./fib.so"; 4 | 5 | console.log("Hello World"); 6 | console.log("fib(10)=", fib(10)); 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |