aboutsummaryrefslogtreecommitdiffhomepage
path: root/transform
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-11-03 22:26:22 +0100
committerRon Evans <[email protected]>2022-11-04 08:28:26 +0100
commit268140ae40185f2b2b79df9e0550cc4f7287692c (patch)
treed09ea9c6e8dfcb5a114c6cb3409ba6e747333fb9 /transform
parent8906584fb976139e5d102faedbd69d9737115327 (diff)
downloadtinygo-268140ae40185f2b2b79df9e0550cc4f7287692c.tar.gz
tinygo-268140ae40185f2b2b79df9e0550cc4f7287692c.zip
wasm: remove -wasm-abi= flag
This flag controls whether to convert external i64 parameters for use in a browser-like environment. This flag was needed in the past because back then we only supported wasm on browsers but no WASI. Now, I can't think of a reason why anybody would want to change the default. For `-target=wasm` (used for browser-like environments), the wasm_exec.js file expects this i64-via-stack ABI. For WASI, there is no limitation on i64 values and `-wasm-abi=generic` is the default.
Diffstat (limited to 'transform')
-rw-r--r--transform/wasm-abi.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/transform/wasm-abi.go b/transform/wasm-abi.go
index 08122a3e4..081558c9e 100644
--- a/transform/wasm-abi.go
+++ b/transform/wasm-abi.go
@@ -14,8 +14,7 @@ import (
// resolved, this pass may be avoided. For more details:
// https://github.com/WebAssembly/design/issues/1172
//
-// This pass can be enabled/disabled with the -wasm-abi flag, and is enabled by
-// default as of december 2019.
+// This pass is enabled via the wasm-abi JSON target key.
func ExternalInt64AsPtr(mod llvm.Module, config *compileopts.Config) error {
ctx := mod.Context()
builder := ctx.NewBuilder()
@@ -145,7 +144,7 @@ func ExternalInt64AsPtr(mod llvm.Module, config *compileopts.Config) error {
builder.SetInsertPointAtEnd(entryBlock)
var callParams []llvm.Value
if fnType.ReturnType() == int64Type {
- return errors.New("not yet implemented: exported function returns i64 with -wasm-abi=js; " +
+ return errors.New("not yet implemented: exported function returns i64 with the JS wasm-abi; " +
"see https://tinygo.org/compiler-internals/calling-convention/")
}
for i, origParam := range fn.Params() {