diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-02 12:16:52 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-02 20:55:38 -0400 |
| commit | 3658b7eb7f2e9178da712bffcb67ba41ef01c43e (patch) | |
| tree | 0c2b108d4048e2d2c9b6167f8f83b91f55963cc5 /src/server/builtins.odin | |
| parent | f770f22960041c74347d2f96247c6d8bf8194d57 (diff) | |
Switch to using out params for `internal_resolve_type_expression` to greatly reduce stack used
Diffstat (limited to 'src/server/builtins.odin')
| -rw-r--r-- | src/server/builtins.odin | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/builtins.odin b/src/server/builtins.odin index e00e000..9b47182 100644 --- a/src/server/builtins.odin +++ b/src/server/builtins.odin @@ -139,7 +139,8 @@ get_return_expr :: proc(ast_context: ^AstContext, expr: ^ast.Expr, is_mutable: b return get_return_expr(ast_context, v.value, is_mutable) } if ident, ok := expr.derived.(^ast.Ident); ok { - if symbol, ok := internal_resolve_type_expression(ast_context, ident); ok { + symbol := Symbol{} + if ok := internal_resolve_type_expression(ast_context, ident, &symbol); ok { if v, ok := symbol.value.(SymbolBasicValue); ok { return v.ident } else if v, ok := symbol.value.(SymbolUntypedValue); ok { @@ -173,7 +174,8 @@ get_complex_return_expr :: proc(ast_context: ^AstContext, expr: ^ast.Expr) -> ^a return get_complex_return_expr(ast_context, v.value) } if ident, ok := expr.derived.(^ast.Ident); ok { - if symbol, ok := internal_resolve_type_expression(ast_context, ident); ok { + symbol := Symbol{} + if ok := internal_resolve_type_expression(ast_context, ident, &symbol); ok { if v, ok := symbol.value.(SymbolBasicValue); ok { return v.ident } else if v, ok := symbol.value.(SymbolUntypedValue); ok { @@ -204,7 +206,8 @@ get_quaternion_return_expr :: proc(ast_context: ^AstContext, expr: ^ast.Expr) -> return get_quaternion_return_expr(ast_context, v.value) } if ident, ok := expr.derived.(^ast.Ident); ok { - if symbol, ok := internal_resolve_type_expression(ast_context, ident); ok { + symbol := Symbol{} + if ok := internal_resolve_type_expression(ast_context, ident, &symbol); ok { if v, ok := symbol.value.(SymbolBasicValue); ok { return v.ident } else if v, ok := symbol.value.(SymbolUntypedValue); ok { |