mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-17 00:11:25 -07:00
Add minor ignoring hint on type assertions to get better code generation with no optimizations enabled
This commit is contained in:
+7
-1
@@ -345,7 +345,13 @@ AST_KIND(_ExprBegin, "", bool) \
|
||||
AST_KIND(FieldValue, "field value", struct { Token eq; Ast *field, *value; }) \
|
||||
AST_KIND(TernaryIfExpr, "ternary if expression", struct { Ast *x, *cond, *y; }) \
|
||||
AST_KIND(TernaryWhenExpr, "ternary when expression", struct { Ast *x, *cond, *y; }) \
|
||||
AST_KIND(TypeAssertion, "type assertion", struct { Ast *expr; Token dot; Ast *type; Type *type_hint; }) \
|
||||
AST_KIND(TypeAssertion, "type assertion", struct { \
|
||||
Ast *expr; \
|
||||
Token dot; \
|
||||
Ast *type; \
|
||||
Type *type_hint; \
|
||||
bool ignores[2]; \
|
||||
}) \
|
||||
AST_KIND(TypeCast, "type cast", struct { Token token; Ast *type, *expr; }) \
|
||||
AST_KIND(AutoCast, "auto_cast", struct { Token token; Ast *expr; }) \
|
||||
AST_KIND(InlineAsmExpr, "inline asm expression", struct { \
|
||||
|
||||
Reference in New Issue
Block a user