factor script optimization Expr AST nodes out of main AST header

This commit is contained in:
Vern Paxson 2024-04-08 18:26:52 -04:00 committed by Tim Wojtulewicz
parent 01fd30dda9
commit 7c8c83efc4
12 changed files with 276 additions and 270 deletions

View file

@ -481,7 +481,8 @@ string CPPCompile::GenAddToExpr(const Expr* e, GenType gt, bool top_level) {
if ( t->Tag() == TYPE_VECTOR ) {
auto& rt = rhs->GetType();
if ( e->AsAddToExpr()->IsVectorElemAppend() )
ASSERT(e->Tag() == EXPR_ADD_TO);
if ( static_cast<const AddToExpr*>(e)->IsVectorElemAppend() )
add_to_func = "vector_append__CPP";
else
add_to_func = "vector_vec_append__CPP";