diff options
author | Sam Clegg <sbc@chromium.org> | 2019-12-08 20:50:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-08 20:50:25 -0600 |
commit | 42b61e3c2e7851ed001bf26a7e1afab21d0cb38d (patch) | |
tree | b86a0a10ec9ea1d4351e4500ff84f987894aaf8e /src | |
parent | b232033385b025ba276423613fb67f644c0596ce (diff) | |
download | binaryen-42b61e3c2e7851ed001bf26a7e1afab21d0cb38d.tar.gz binaryen-42b61e3c2e7851ed001bf26a7e1afab21d0cb38d.tar.bz2 binaryen-42b61e3c2e7851ed001bf26a7e1afab21d0cb38d.zip |
Use wat over wast for text format filenames (#2518)
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/passes/OptimizeInstructions.wat (renamed from src/passes/OptimizeInstructions.wast) | 4 | ||||
-rw-r--r-- | src/passes/OptimizeInstructions.wat.processed (renamed from src/passes/OptimizeInstructions.wast.processed) | 4 | ||||
-rw-r--r-- | src/passes/Print.cpp | 2 | ||||
-rw-r--r-- | src/passes/RemoveNonJSOps.cpp | 4 | ||||
-rw-r--r-- | src/passes/pass.cpp | 2 | ||||
-rw-r--r-- | src/passes/wasm-intrinsics.wat (renamed from src/passes/wasm-intrinsics.wast) | 0 | ||||
-rw-r--r-- | src/tools/wasm-as.cpp | 4 | ||||
-rw-r--r-- | src/tools/wasm-dis.cpp | 2 | ||||
-rw-r--r-- | src/tools/wasm2js.cpp | 4 |
10 files changed, 13 insertions, 17 deletions
diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt index 9ab735efe..a3dd1c26a 100644 --- a/src/passes/CMakeLists.txt +++ b/src/passes/CMakeLists.txt @@ -1,7 +1,7 @@ add_custom_command( OUTPUT WasmIntrinsics.cpp - COMMAND python ${PROJECT_SOURCE_DIR}/scripts/embedwast.py ${PROJECT_SOURCE_DIR}/src/passes/wasm-intrinsics.wast ${CMAKE_CURRENT_BINARY_DIR}/WasmIntrinsics.cpp - DEPENDS ${PROJECT_SOURCE_DIR}/scripts/embedwast.py wasm-intrinsics.wast) + COMMAND python ${PROJECT_SOURCE_DIR}/scripts/embedwat.py ${PROJECT_SOURCE_DIR}/src/passes/wasm-intrinsics.wat ${CMAKE_CURRENT_BINARY_DIR}/WasmIntrinsics.cpp + DEPENDS ${PROJECT_SOURCE_DIR}/scripts/embedwat.py wasm-intrinsics.wat) set(passes_SOURCES pass.cpp diff --git a/src/passes/OptimizeInstructions.wast b/src/passes/OptimizeInstructions.wat index 5142dc2c6..d690e9365 100644 --- a/src/passes/OptimizeInstructions.wast +++ b/src/passes/OptimizeInstructions.wat @@ -1,8 +1,7 @@ - ;; This file contains patterns for OptimizeInstructions. Basically, we use a DSL for the patterns, ;; and the DSL is just wasm itself, plus some functions with special meanings ;; -;; This file is converted into OptimizeInstructions.wast.processed by +;; This file is converted into OptimizeInstructions.wat.processed by ;; scripts/process_optimize_instructions.py ;; which makes it importable by C++. Then we just #include it there, avoiding the need to ship ;; a data file on the side. @@ -24,4 +23,3 @@ ) ) ) - diff --git a/src/passes/OptimizeInstructions.wast.processed b/src/passes/OptimizeInstructions.wat.processed index b69ecdf04..b0be5de36 100644 --- a/src/passes/OptimizeInstructions.wast.processed +++ b/src/passes/OptimizeInstructions.wat.processed @@ -1,8 +1,7 @@ -"\n" ";; This file contains patterns for OptimizeInstructions. Basically, we use a DSL for the patterns,\n" ";; and the DSL is just wasm itself, plus some functions with special meanings\n" ";;\n" -";; This file is converted into OptimizeInstructions.wast.processed by\n" +";; This file is converted into OptimizeInstructions.wat.processed by\n" ";; scripts/process_optimize_instructions.py\n" ";; which makes it importable by C++. Then we just #include it there, avoiding the need to ship\n" ";; a data file on the side.\n" @@ -24,4 +23,3 @@ ")\n" ")\n" ")\n" -"\n" diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 62161c6b0..2ec92a086 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -1798,7 +1798,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> { } } } - // try-catch-end is written in the folded wast format as + // try-catch-end is written in the folded wat format as // (try // ... // (catch diff --git a/src/passes/RemoveNonJSOps.cpp b/src/passes/RemoveNonJSOps.cpp index a2fe10812..eebd97ae1 100644 --- a/src/passes/RemoveNonJSOps.cpp +++ b/src/passes/RemoveNonJSOps.cpp @@ -21,7 +21,7 @@ // intrinsic implementation. Intrinsics don't use themselves to implement // themselves. // -// You'll find a large wast blob in `wasm-intrinsics.wast` next to this file +// You'll find a large wat blob in `wasm-intrinsics.wat` next to this file // which contains all of the injected intrinsics. We manually copy over any // needed intrinsics from this module into the module that we're optimizing // after walking the current module. @@ -65,7 +65,7 @@ struct RemoveNonJSOpsPass : public WalkerPass<PostWalker<RemoveNonJSOpsPass>> { return; } - // Parse the wast blob we have at the end of this file. + // Parse the wat blob we have at the end of this file. // // TODO: only do this once per invocation of wasm2asm Module intrinsicsModule; diff --git a/src/passes/pass.cpp b/src/passes/pass.cpp index 906fb85e2..4b3021764 100644 --- a/src/passes/pass.cpp +++ b/src/passes/pass.cpp @@ -454,7 +454,7 @@ void PassRunner::addDefaultGlobalOptimizationPostPasses() { } static void dumpWast(Name name, Module* wasm) { - // write out the wast + // write out the wat static int counter = 0; std::string numstr = std::to_string(counter++); while (numstr.size() < 3) { diff --git a/src/passes/wasm-intrinsics.wast b/src/passes/wasm-intrinsics.wat index f54547a0d..f54547a0d 100644 --- a/src/passes/wasm-intrinsics.wast +++ b/src/passes/wasm-intrinsics.wat diff --git a/src/tools/wasm-as.cpp b/src/tools/wasm-as.cpp index cb6a8f226..67a7d6f14 100644 --- a/src/tools/wasm-as.cpp +++ b/src/tools/wasm-as.cpp @@ -36,7 +36,7 @@ int main(int argc, const char* argv[]) { std::string sourceMapFilename; std::string sourceMapUrl; ToolOptions options("wasm-as", - "Assemble a .wast (WebAssembly text format) into a .wasm " + "Assemble a .wat (WebAssembly text format) into a .wasm " "(WebAssembly binary format)"); options.extra["validate"] = "wasm"; options @@ -94,7 +94,7 @@ int main(int argc, const char* argv[]) { // default output is infile with changed suffix if (options.extra.find("output") == options.extra.end()) { options.extra["output"] = - removeSpecificSuffix(options.extra["infile"], ".wast") + ".wasm"; + removeSpecificSuffix(options.extra["infile"], ".wat") + ".wasm"; } auto input(read_file<std::string>(options.extra["infile"], Flags::Text)); diff --git a/src/tools/wasm-dis.cpp b/src/tools/wasm-dis.cpp index 493a55566..89925b9cc 100644 --- a/src/tools/wasm-dis.cpp +++ b/src/tools/wasm-dis.cpp @@ -31,7 +31,7 @@ int main(int argc, const char* argv[]) { std::string sourceMapFilename; Options options("wasm-dis", "Un-assemble a .wasm (WebAssembly binary format) into a " - ".wast (WebAssembly text format)"); + ".wat (WebAssembly text format)"); options .add("--output", "-o", diff --git a/src/tools/wasm2js.cpp b/src/tools/wasm2js.cpp index b8e2daa39..7fa56c810 100644 --- a/src/tools/wasm2js.cpp +++ b/src/tools/wasm2js.cpp @@ -809,7 +809,7 @@ void AssertionEmitter::emit() { int main(int argc, const char* argv[]) { Wasm2JSBuilder::Flags flags; OptimizationOptions options("wasm2js", - "Transform .wasm/.wast files to asm.js"); + "Transform .wasm/.wat files to asm.js"); options .add("--output", "-o", @@ -873,7 +873,7 @@ int main(int argc, const char* argv[]) { try { // If the input filename ends in `.wasm`, then parse it in binary form, - // otherwise assume it's a `*.wast` file and go from there. + // otherwise assume it's a `*.wat` file and go from there. // // Note that we're not using the built-in `ModuleReader` which will also do // similar logic here because when testing JS files we use the |