Minor cleanup for builtin scope/pkg

This commit is contained in:
gingerBill
2018-06-17 22:07:27 +01:00
parent a99cc2fd70
commit a4e3201113
6 changed files with 51 additions and 48 deletions
+9 -2
View File
@@ -224,14 +224,14 @@ struct Scope {
PtrSet<Scope *> imported;
bool is_proc;
bool is_global;
bool is_package;
bool is_pkg;
bool is_file;
bool is_init;
bool is_struct;
bool has_been_imported; // This is only applicable to file scopes
union {
AstPackage *package;
AstPackage *pkg;
AstFile * file;
};
};
@@ -347,6 +347,13 @@ struct Checker {
gb_global AstPackage *builtin_pkg = nullptr;
gb_global Scope * builtin_scope = nullptr;
HashKey hash_node (Ast *node) { return hash_pointer(node); }
HashKey hash_ast_file (AstFile *file) { return hash_pointer(file); }
HashKey hash_entity (Entity *e) { return hash_pointer(e); }