mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Replace gradle node plugin and switch to V8 canary.
This commit is contained in:
parent
42c68257b6
commit
b6238124c7
22
build.gradle
22
build.gradle
@ -1,5 +1,4 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.github.node-gradle.node" version "2.2.3"
|
|
||||||
id 'com.github.kt3k.coveralls' version '2.8.2' // Coverage
|
id 'com.github.kt3k.coveralls' version '2.8.2' // Coverage
|
||||||
id "com.jfrog.bintray" version "1.8.4"
|
id "com.jfrog.bintray" version "1.8.4"
|
||||||
}
|
}
|
||||||
@ -83,27 +82,6 @@ artifacts {
|
|||||||
archives javadocJar
|
archives javadocJar
|
||||||
}
|
}
|
||||||
|
|
||||||
node {
|
|
||||||
version = '14.0.0'
|
|
||||||
// version = '+'
|
|
||||||
download = true
|
|
||||||
}
|
|
||||||
|
|
||||||
task nodeVersion(type: NodeTask) {
|
|
||||||
test.dependsOn it
|
|
||||||
options = ['-v']
|
|
||||||
script = file("$buildDir/tmp/scriptDoesNotExists.js")
|
|
||||||
script.parentFile.mkdirs()
|
|
||||||
script.text = ''
|
|
||||||
doLast {
|
|
||||||
if( node.download ) {
|
|
||||||
def nodeDir = nodeSetup.getNodeDir() // dir is only valid if downloaded
|
|
||||||
println nodeDir
|
|
||||||
test.systemProperty 'node.dir', nodeDir
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
test {
|
||||||
systemProperty "file.encoding", "UTF-8"
|
systemProperty "file.encoding", "UTF-8"
|
||||||
testLogging {
|
testLogging {
|
||||||
|
@ -125,8 +125,8 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
|||||||
writeSection( SectionType.Function, functions.values() );
|
writeSection( SectionType.Function, functions.values() );
|
||||||
writeTableSection();
|
writeTableSection();
|
||||||
writeMemorySection();
|
writeMemorySection();
|
||||||
|
writeEventSection();
|
||||||
writeSection( SectionType.Global, globals.values() );
|
writeSection( SectionType.Global, globals.values() );
|
||||||
writeEventSection(); // TODO event section before global section
|
|
||||||
writeSection( SectionType.Export, exports );
|
writeSection( SectionType.Export, exports );
|
||||||
writeStartSection();
|
writeStartSection();
|
||||||
writeElementSection();
|
writeElementSection();
|
||||||
|
@ -44,7 +44,7 @@ public enum ScriptEngine {
|
|||||||
public static ScriptEngine[] testEngines() {
|
public static ScriptEngine[] testEngines() {
|
||||||
ScriptEngine[] val = { //
|
ScriptEngine[] val = { //
|
||||||
SpiderMonkey, //
|
SpiderMonkey, //
|
||||||
//TODO NodeJS, //
|
NodeJS, //
|
||||||
//TODO NodeWat, //
|
//TODO NodeWat, //
|
||||||
SpiderMonkeyWat,//
|
SpiderMonkeyWat,//
|
||||||
//TODO Wat2Wasm, //
|
//TODO Wat2Wasm, //
|
||||||
|
@ -57,6 +57,8 @@ public class WasmRule extends TemporaryFolder {
|
|||||||
|
|
||||||
private static final SpiderMonkey spiderMonkey = new SpiderMonkey();
|
private static final SpiderMonkey spiderMonkey = new SpiderMonkey();
|
||||||
|
|
||||||
|
private static final Node node = new Node();
|
||||||
|
|
||||||
private static final Wat2Wasm wat2Wasm = new Wat2Wasm();
|
private static final Wat2Wasm wat2Wasm = new Wat2Wasm();
|
||||||
|
|
||||||
private static boolean npmWabtNightly;
|
private static boolean npmWabtNightly;
|
||||||
@ -619,10 +621,12 @@ public class WasmRule extends TemporaryFolder {
|
|||||||
* The executable of the node command.
|
* The executable of the node command.
|
||||||
*
|
*
|
||||||
* @return the node executable
|
* @return the node executable
|
||||||
|
* @throws IOException
|
||||||
|
* if any I/O error occur
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private static String nodeExecuable() {
|
private static String nodeExecuable() throws IOException {
|
||||||
String command = System.getProperty( "node.dir" );
|
String command = node.getNodeDir();
|
||||||
if( command == null ) {
|
if( command == null ) {
|
||||||
command = "node";
|
command = "node";
|
||||||
} else {
|
} else {
|
||||||
@ -641,14 +645,17 @@ public class WasmRule extends TemporaryFolder {
|
|||||||
* @param script
|
* @param script
|
||||||
* the path to the script that should be executed
|
* the path to the script that should be executed
|
||||||
* @return the value from the script
|
* @return the value from the script
|
||||||
|
* @throws IOException
|
||||||
|
* if any I/O error occur
|
||||||
*/
|
*/
|
||||||
private static ProcessBuilder nodeJsCommand( File script ) {
|
private static ProcessBuilder nodeJsCommand( File script ) throws IOException {
|
||||||
String command = nodeExecuable();
|
String command = nodeExecuable();
|
||||||
// details see with command: node --v8-options
|
// details see with command: node --v8-options
|
||||||
ProcessBuilder processBuilder = new ProcessBuilder( command, //
|
ProcessBuilder processBuilder = new ProcessBuilder( command, //
|
||||||
"--experimental-wasm-mv", // multi value
|
"--experimental-wasm-mv", // multi value
|
||||||
"--experimental-wasm-eh", // exception handling
|
"--experimental-wasm-eh", // exception handling
|
||||||
"--experimental-wasm-anyref", //
|
"--experimental-wasm-anyref", //
|
||||||
|
"--experimental-wasm-gc", //
|
||||||
"--experimental-wasm-bigint", //
|
"--experimental-wasm-bigint", //
|
||||||
"--experimental-wasm-bulk-memory", // bulk memory for WABT version 1.0.13, https://github.com/WebAssembly/wabt/issues/1311
|
"--experimental-wasm-bulk-memory", // bulk memory for WABT version 1.0.13, https://github.com/WebAssembly/wabt/issues/1311
|
||||||
script.getName() );
|
script.getName() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user