Misc changes

This commit is contained in:
Krzosa Karol
2023-01-01 20:08:07 +01:00
parent 1121e4aa84
commit 5138ba0097
2 changed files with 5 additions and 6 deletions

View File

@@ -296,6 +296,7 @@ CORE_Static Intern_String
//-----------------------------------------------------------------------------
// Array List
// @todo(krzosa): If even one item got removed from block
// @! Make List api more convenient list.add
// the block should go on free list
//-----------------------------------------------------------------------------
const int LIST_DEFAULT_BLOCK_SIZE = 32;
@@ -348,7 +349,6 @@ struct List{
result.node_index = -1;
return ++result;
}
Iter end() { return{}; }
friend bool operator!=(Iter &a, Iter &b) { return a.item != b.item; }
};

View File

@@ -1,6 +1,6 @@
CORE_Static void
core_init_compiler(Core_Ctx *ctx, Allocator *allocator) {
//apifn
static void core_init_compiler(Core_Ctx *ctx, Allocator *allocator) {
ctx->time.init_context = os_time();
pctx = ctx;
@@ -158,8 +158,8 @@ pctx->op_info_table[19] = {pctx->intern("!"_s), "NOT"_s, TK_Not, 0, 1};
ctx->time.init_context = os_time() - ctx->time.init_context;
}
CORE_Static void
core_bootstrap_compiler(Allocator *allocator) {
//apifn
static void core_bootstrap_compiler(Allocator *allocator) {
Core_Ctx *ctx = allocate_struct(allocator, Core_Ctx);
core_init_compiler(ctx, allocator);
}
@@ -189,7 +189,6 @@ parse_all_modules() {
if (module != pctx->language_base_module) {
add(pctx->perm, &module->implicit_imports, (Ast_Scope *)pctx->language_base_module);
// module->implicit_imports.add(pctx->language_base_module);
}
module->state = MODULE_PARSED;