- Removes the argument from the list and replaces the function with the
baked function
- [ ] Add SIMD intrinsics
+ [X] Add SIMD intrinsics
- This also requires adding the v128 SIMD type
[ ] Add threading intrinsics
- This will actually be fairly easy since I think all that is needed is
to implement the intrinsics.
- [ ] Type parameterized structs
+ [X] Type parameterized structs
[ ] Array literals
use package core
main :: proc (args: [] cstring) {
- imap : I32Map(i32);
+ imap : I32Map(^string);
i32map_init(^imap);
- i32map_put(^imap, 50, 1234);
- i32map_put(^imap, 1234, 5678);
+ hello := "Hello ";
+ world := "World!";
+
+ i32map_put(^imap, 50, ^hello);
+ i32map_put(^imap, 1234, ^world);
print(i32map_has(^imap, 50));
print("\n");
print(i32map_has(^imap, 51));
print("\n");
- print(i32map_get(^imap, 50));
- print(i32map_get(^imap, 1234));
+ // i32map_delete(^imap, 50);
+
+ print(*i32map_get(^imap, 50));
+ print(*i32map_get(^imap, 1234));
print("\n");
}
fori (i, 0, bh_arr_length(params)) bh_arr_push(cs_type->Struct.poly_args, params[i]);
+ char name_buf[256];
+ fori (i, 0, 256) name_buf[i] = 0;
+
+ strncat(name_buf, ps_type->name, 255);
+ strncat(name_buf, "(", 255);
+ bh_arr_each(Type *, ptype, cs_type->Struct.poly_args) {
+ if (ptype != cs_type->Struct.poly_args)
+ strncat(name_buf, ", ", 255);
+
+ strncat(name_buf, type_get_name(*ptype), 255);
+ }
+ strncat(name_buf, ")", 255);
+ cs_type->Struct.name = bh_aprintf(semstate.node_allocator, "%s", name_buf);
+
return concrete_struct;
}