aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/analysis.odin3
-rw-r--r--src/server/ast.odin9
-rw-r--r--src/server/documentation.odin3
-rw-r--r--src/server/symbol.odin1
4 files changed, 16 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index 7798be9..20c7749 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -3224,6 +3224,9 @@ make_symbol_array_from_ast :: proc(ast_context: ^AstContext, v: ast.Array_Type,
if array_is_soa(v) {
symbol.flags |= {.Soa}
}
+ if array_is_simd(v) {
+ symbol.flags |= {.Simd}
+ }
return symbol
}
diff --git a/src/server/ast.odin b/src/server/ast.odin
index 1ecbb42..91c413f 100644
--- a/src/server/ast.odin
+++ b/src/server/ast.odin
@@ -268,6 +268,15 @@ array_is_soa :: proc(array: ast.Array_Type) -> bool {
return false
}
+array_is_simd :: proc(array: ast.Array_Type) -> bool {
+ if array.tag != nil {
+ if basic, ok := array.tag.derived.(^ast.Basic_Directive); ok && basic.name == "simd" {
+ return true
+ }
+ }
+ return false
+}
+
dynamic_array_is_soa :: proc(array: ast.Dynamic_Array_Type) -> bool {
if array.tag != nil {
if basic, ok := array.tag.derived.(^ast.Basic_Directive); ok && basic.name == "soa" {
diff --git a/src/server/documentation.odin b/src/server/documentation.odin
index 25d9de3..3c75ae3 100644
--- a/src/server/documentation.odin
+++ b/src/server/documentation.odin
@@ -407,6 +407,9 @@ write_short_signature :: proc(sb: ^strings.Builder, ast_context: ^AstContext, sy
strings.write_string(sb, "#soa")
}
strings.write_string(sb, pointer_prefix)
+ if .Simd in symbol.flags {
+ strings.write_string(sb, "#simd")
+ }
if .Soa in symbol.flags {
strings.write_string(sb, "#soa")
}
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index f140694..dac9e7d 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -204,6 +204,7 @@ SymbolFlag :: enum {
ObjCIsClassMethod, // should be set true only when ObjC is enabled
Soa,
SoaPointer,
+ Simd,
Parameter, //If the symbol is a procedure argument
}