map.init(^ages, default=0, hash_count=16);
defer map.free(^ages);
+ // Alternatively you can use the map.make function to achieve the
+ // same thing:
+ // ages := map.make(str, u32, default = 0);
+
// The defer statement ensures that the map memory will be freed
// when this procedure exits, no matter through which way. The
// 'default' argument is used to specify what value should be
switch (action) {
case bh_allocator_action_alloc: {
+ bh_align(alloc_arena->size, alignment);
+
// TODO: Do this better because right now bh__align is bad
// size = bh__align(size, alignment);
if (size > alloc_arena->arena_size - size_of(ptr)) {
symres_expression(&sln->value);
if (onyx_has_errors()) return;
- if (node_is_type(sln->value)) {
+ if (node_is_type((AstNode *) sln->value)) {
sln->type = type_build_from_ast(semstate.node_allocator, sln->ast_type);
sln->kind = PSK_Type;
} else {