mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[qfcc] Force symbol lookup when processing expressions
This fixes the constant type reference ICE for subpassLoad. The problem was stale symbols recorded in the expressions thus gsubpassInput referred to the allowed types for the generic function rather than the type specific to the call.
This commit is contained in:
parent
5b9d241177
commit
e7d3259829
3 changed files with 5 additions and 1 deletions
|
@ -221,6 +221,7 @@ typedef struct rua_ctx_s {
|
|||
void *scanner;
|
||||
language_t *language;
|
||||
bool extdecl;
|
||||
bool force_lookup;
|
||||
} rua_ctx_t;
|
||||
|
||||
extern language_t lang_ruamoko;
|
||||
|
|
|
@ -939,6 +939,8 @@ expr_process (const expr_t *expr, rua_ctx_t *ctx)
|
|||
expr_names[expr->type]);
|
||||
}
|
||||
|
||||
bool force_lookup = ctx->force_lookup;
|
||||
ctx->force_lookup = true;
|
||||
auto proc = funcs[expr->type] (expr, ctx);
|
||||
proc = edag_add_expr (proc);
|
||||
if (proc && proc->type == ex_process) {
|
||||
|
@ -949,6 +951,7 @@ expr_process (const expr_t *expr, rua_ctx_t *ctx)
|
|||
proc = expr_process (proc->process.expr, ctx);
|
||||
current_func = func;
|
||||
}
|
||||
ctx->force_lookup = force_lookup;
|
||||
return proc;
|
||||
}
|
||||
|
||||
|
|
|
@ -894,7 +894,7 @@ resolve_type (const expr_t *te, rua_ctx_t *ctx)
|
|||
{
|
||||
if (te->type == ex_symbol) {
|
||||
auto sym = te->symbol;
|
||||
if (sym->sy_type == sy_name) {
|
||||
if (ctx->force_lookup || sym->sy_type == sy_name) {
|
||||
sym = symtab_lookup (current_symtab, sym->name);
|
||||
if (sym && sym->sy_type == sy_type_param) {
|
||||
te = sym->expr;
|
||||
|
|
Loading…
Reference in a new issue