diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/cost.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ir/cost.h b/src/ir/cost.h index b8a4bf64a..95ef99b65 100644 --- a/src/ir/cost.h +++ b/src/ir/cost.h @@ -24,7 +24,7 @@ namespace wasm { // Measure the execution cost of an AST. Very handwave-ey -struct CostAnalyzer : public Visitor<CostAnalyzer, Index> { +struct CostAnalyzer : public OverriddenVisitor<CostAnalyzer, Index> { CostAnalyzer(Expression* ast) { cost = visit(ast); } Index cost; @@ -550,6 +550,21 @@ struct CostAnalyzer : public Visitor<CostAnalyzer, Index> { Index visitPop(Pop* curr) { return 0; } Index visitNop(Nop* curr) { return 0; } Index visitUnreachable(Unreachable* curr) { return 0; } + Index visitDataDrop(DataDrop* curr) { return 5; } + Index visitI31New(I31New* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitI31Get(I31Get* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitRefTest(RefTest* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitRefCast(RefCast* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitBrOnCast(BrOnCast* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitRttCanon(RttCanon* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitRttSub(RttSub* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitStructNew(StructNew* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitStructGet(StructGet* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitStructSet(StructSet* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitArrayNew(ArrayNew* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitArrayGet(ArrayGet* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitArraySet(ArraySet* curr) { WASM_UNREACHABLE("TODO: GC"); } + Index visitArrayLen(ArrayLen* curr) { WASM_UNREACHABLE("TODO: GC"); } }; } // namespace wasm |