aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-07-28 22:58:56 +0100
committergingerBill <bill@gingerbill.org>2019-07-28 22:58:56 +0100
commit2c5c8192f8fcb40fdef183c25a8d799f23f23439 (patch)
treebc2baa8d13741dd8f7e56d5f770c091e6b9beaf2 /src
parent162c87b1b810770f75920a51682a8f6b63adeba4 (diff)
Fix parsing for procedure literals expression statements; improve assert performance; other minor fixes
Diffstat (limited to 'src')
-rw-r--r--src/ir.cpp2
-rw-r--r--src/parser.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 1105eac29..0a5dc7528 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -3053,7 +3053,7 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> args, Pro
if (value->kind == irValue_Proc) {
irProcedure *the_proc = &value->Proc;
Entity *e = the_proc->entity;
- if (entity_has_deferred_procedure(e)) {
+ if (e != nullptr && entity_has_deferred_procedure(e)) {
DeferredProcedureKind kind = e->Procedure.deferred_procedure.kind;
Entity *deferred_entity = e->Procedure.deferred_procedure.entity;
irValue **deferred_found = map_get(&p->module->values, hash_entity(deferred_entity));
diff --git a/src/parser.cpp b/src/parser.cpp
index a377b773c..d1fd94c1d 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -3759,6 +3759,7 @@ Ast *parse_stmt(AstFile *f) {
switch (token.kind) {
// Operands
case Token_context: // Also allows for `context =`
+ case Token_proc:
case Token_inline:
case Token_no_inline:
case Token_Ident: