summaryrefslogtreecommitdiff
path: root/include/wabt/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/wabt/ir.h')
-rw-r--r--include/wabt/ir.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/wabt/ir.h b/include/wabt/ir.h
index 2bc5d9bd..49b7e2b0 100644
--- a/include/wabt/ir.h
+++ b/include/wabt/ir.h
@@ -310,6 +310,13 @@ class FuncType : public TypeEntry {
Type GetResultType(Index index) const { return sig.GetResultType(index); }
FuncSignature sig;
+
+ // The BinaryReaderIR tracks whether a FuncType is the target of a tailcall
+ // (via a return_call_indirect). wasm2c (CWriter) uses this information to
+ // limit its output in some cases.
+ struct {
+ bool tailcall = false;
+ } features_used;
};
struct Field {
@@ -893,6 +900,13 @@ struct Func {
BindingHash bindings;
ExprList exprs;
Location loc;
+
+ // For a subset of features, the BinaryReaderIR tracks whether they are
+ // actually used by the function. wasm2c (CWriter) uses this information to
+ // limit its output in some cases.
+ struct {
+ bool tailcall = false;
+ } features_used;
};
struct Global {