aboutsummaryrefslogtreecommitdiff
path: root/src/checker.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-02-05 18:17:55 +0000
committerGinger Bill <bill@gingerbill.org>2017-02-05 18:17:55 +0000
commitb1562edccf9ea972ec8caf5faebea07cf27559bb (patch)
treeb6a0dfa591b33b277c583f287643deaaa213284a /src/checker.c
parent2a5b674d33e4f483964da119f76038457cd9f1f2 (diff)
Add `types.odin`; Begin work on `map`
Diffstat (limited to 'src/checker.c')
-rw-r--r--src/checker.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/checker.c b/src/checker.c
index cd0a9ddef..938a09f40 100644
--- a/src/checker.c
+++ b/src/checker.c
@@ -28,6 +28,7 @@ typedef enum BuiltinProcId {
BuiltinProc_free,
BuiltinProc_reserve,
+ BuiltinProc_clear,
BuiltinProc_append,
BuiltinProc_size_of,
@@ -69,6 +70,7 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_Count] = {
{STR_LIT("free"), 1, false, Expr_Stmt},
{STR_LIT("reserve"), 2, false, Expr_Stmt},
+ {STR_LIT("clear"), 1, false, Expr_Stmt},
{STR_LIT("append"), 1, true, Expr_Expr},
{STR_LIT("size_of"), 1, false, Expr_Expr},
@@ -610,6 +612,7 @@ void init_universal_scope(BuildContext *bc) {
// TODO(bill): Set through flags in the compiler
add_global_string_constant(a, str_lit("ODIN_OS"), bc->ODIN_OS);
add_global_string_constant(a, str_lit("ODIN_ARCH"), bc->ODIN_ARCH);
+ add_global_string_constant(a, str_lit("ODIN_ENDIAN"), bc->ODIN_ENDIAN);
add_global_string_constant(a, str_lit("ODIN_VENDOR"), bc->ODIN_VENDOR);
add_global_string_constant(a, str_lit("ODIN_VERSION"), bc->ODIN_VERSION);
add_global_string_constant(a, str_lit("ODIN_ROOT"), bc->ODIN_ROOT);
@@ -1141,6 +1144,11 @@ void init_preload(Checker *c) {
t_context_ptr = make_type_pointer(c->allocator, t_context);
}
+ if (t_raw_dynamic_array == NULL) {
+ Entity *e = find_core_entity(c, str_lit("Raw_Dynamic_Array"));
+ t_raw_dynamic_array = e->type;
+ }
+
c->done_preload = true;
}