Skip to content

Commit

Permalink
Live tracing failed to trace expression types. This fixes #832.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Jul 7, 2023
1 parent 4f7b42c commit 79e2d68
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/compiler/sema_liveness.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ static void sema_trace_expr_liveness(Expr *expr);
static void sema_trace_stmt_liveness(Ast *ast);
static void sema_trace_decl_liveness(Decl *decl);

INLINE void sema_trace_type_liveness(Type *type)
{
if (!type || !type_is_user_defined(type)) return;
sema_trace_decl_liveness(type->decl);
}

INLINE void sema_trace_exprid_liveness(ExprId expr)
{
if (expr) sema_trace_expr_liveness(exprptr(expr));
Expand Down Expand Up @@ -234,6 +240,7 @@ static void sema_trace_expr_liveness(Expr *expr)
{
RETRY:
if (!expr) return;
sema_trace_type_liveness(expr->type);
switch (expr->expr_kind)
{
case EXPR_SUBSCRIPT_ASSIGN:
Expand Down Expand Up @@ -491,11 +498,6 @@ void sema_trace_liveness(void)
FOREACH_END();
}

INLINE void sema_trace_type_liveness(Type *type)
{
if (!type || !type_is_user_defined(type)) return;
sema_trace_decl_liveness(type->decl);
}

INLINE void sema_trace_decl_dynamic_methods(Decl *decl)
{
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define COMPILER_VERSION "0.4.555"
#define COMPILER_VERSION "0.4.556"

0 comments on commit 79e2d68

Please sign in to comment.