From f6cca313a919550d76c4ef3e7830a8b82fa93b0a Mon Sep 17 00:00:00 2001 From: PGZXB <420254146@qq.com> Date: Sun, 15 May 2022 11:25:38 +0800 Subject: [PATCH] Add ASTSerializer::visit(ReferenceExpression *) --- taichi/analysis/gen_offline_cache_key.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/taichi/analysis/gen_offline_cache_key.cpp b/taichi/analysis/gen_offline_cache_key.cpp index 678076650e51a..bab660c68409b 100644 --- a/taichi/analysis/gen_offline_cache_key.cpp +++ b/taichi/analysis/gen_offline_cache_key.cpp @@ -236,6 +236,11 @@ class ASTSerializer : public IRVisitor, public ExpressionVisitor { emit(expr->conv_type); } + void visit(ReferenceExpression *expr) override { + emit(ExprOpCode::ReferenceExpression); + emit(expr->var); + } + void visit(Block *block) override { emit(StmtOpCode::EnterBlock); emit(static_cast(block->statements.size()));