aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-04 05:04:45 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-04 05:04:45 -0400
commitaf15e89303ba7e37e9f25c2cead4910ab5d09202 (patch)
treef1e87eb1a9c31050653559e9729b0f0a5a3a19f7 /compile.c
parent1092185c843d77b5535d44956c1db1aa484d4b74 (diff)
For arrays, use implicit filename from macro
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index cf7f7e72..7b936829 100644
--- a/compile.c
+++ b/compile.c
@@ -230,7 +230,7 @@ static CORD compile_lvalue(env_t *env, ast_t *ast)
return CORD_all("Array_lvalue(", compile_type(item_type), ", ", target_code, ", ",
compile_int_to_type(env, index->index, Type(IntType, .bits=TYPE_IBITS64)),
", ", CORD_asprintf("%ld", padded_type_size(item_type)),
- ", ", CORD_quoted(ast->file->filename), ", ", heap_strf("%ld", ast->start - ast->file->text),
+ ", ", heap_strf("%ld", ast->start - ast->file->text),
", ", heap_strf("%ld", ast->end - ast->file->text), ")");
}
} else {
@@ -2811,7 +2811,6 @@ CORD compile(env_t *env, ast_t *ast)
else
return CORD_all("Array_get(", compile_type(item_type), ", ", arr, ", ",
compile_int_to_type(env, indexing->index, Type(IntType, .bits=TYPE_IBITS64)), ", ",
- CORD_quoted(f->filename), ", ",
CORD_asprintf("%ld", (int64_t)(indexing->index->start - f->text)), ", ",
CORD_asprintf("%ld", (int64_t)(indexing->index->end - f->text)),
")");