diff options
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/generics.odin | 2 | ||||
| -rw-r--r-- | src/server/symbol.odin | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/server/generics.odin b/src/server/generics.odin index 37546a2..fc22942 100644 --- a/src/server/generics.odin +++ b/src/server/generics.odin @@ -129,7 +129,6 @@ resolve_poly :: proc( } case ^ast.Dynamic_Array_Type: if call_array, ok := call_node.derived.(^ast.Dynamic_Array_Type); ok { - if dynamic_array_is_soa(p^) != dynamic_array_is_soa(call_array^) { return false } @@ -636,7 +635,6 @@ resolve_generic_function_symbol :: proc( append(&return_types, field) } - for param in params { field := cast(^ast.Field)clone_node(param, ast_context.allocator, nil) diff --git a/src/server/symbol.odin b/src/server/symbol.odin index 6cf24df..5181ca3 100644 --- a/src/server/symbol.odin +++ b/src/server/symbol.odin @@ -821,11 +821,21 @@ symbol_to_expr :: proc(symbol: Symbol, file: string, allocator := context.temp_a case SymbolDynamicArrayValue: type := new_type(ast.Dynamic_Array_Type, pos, end, allocator) type.elem = v.expr + if .Soa in symbol.flags { + directive := new_type(ast.Basic_Directive, pos, end, allocator) + directive.name = "soa" + type.tag = directive + } return type case SymbolFixedArrayValue: type := new_type(ast.Array_Type, pos, end, allocator) type.elem = v.expr type.len = v.len + if .Soa in symbol.flags { + directive := new_type(ast.Basic_Directive, pos, end, allocator) + directive.name = "soa" + type.tag = directive + } return type case SymbolMapValue: type := new_type(ast.Map_Type, pos, end, allocator) @@ -837,6 +847,11 @@ symbol_to_expr :: proc(symbol: Symbol, file: string, allocator := context.temp_a case SymbolSliceValue: type := new_type(ast.Array_Type, pos, end, allocator) type.elem = v.expr + if .Soa in symbol.flags { + directive := new_type(ast.Basic_Directive, pos, end, allocator) + directive.name = "soa" + type.tag = directive + } return type case SymbolStructValue: type := new_type(ast.Struct_Type, pos, end, allocator) |