From f1adbd18a2fe262ee7474193383ea579f09e794e Mon Sep 17 00:00:00 2001 From: Teodor Dutu Date: Tue, 19 Nov 2024 17:44:12 +0200 Subject: [PATCH] dinterpret.d: Remove special case for `_d_arrayappend{cTX,T}` (#17076) PR #14985 introduced `LoweredAssignExp` with a separate field to store the lowering during semantic analysis. Then #15791 placed the lowering of `CatAssignExp`s into this field, but did not remove the code that was previously recreating the original `CatAssignExp` from the lowering during CTFE. Signed-off-by: Teodor Dutu --- compiler/src/dmd/dinterpret.d | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/compiler/src/dmd/dinterpret.d b/compiler/src/dmd/dinterpret.d index 43585b0e6c6..f219e3f2027 100644 --- a/compiler/src/dmd/dinterpret.d +++ b/compiler/src/dmd/dinterpret.d @@ -4855,33 +4855,6 @@ public: return; } - else if (fd.ident == Id._d_arrayappendT || fd.ident == Id._d_arrayappendTTrace) - { - // In expressionsem.d `ea ~= eb` was lowered to `_d_arrayappendT{,Trace}({file, line, funcname}, ea, eb);`. - // The following code will rewrite it back to `ea ~= eb` and then interpret that expression. - Expression lhs, rhs; - - if (fd.ident == Id._d_arrayappendT) - { - assert(e.arguments.length == 2); - lhs = (*e.arguments)[0]; - rhs = (*e.arguments)[1]; - } - else - { - assert(e.arguments.length == 5); - lhs = (*e.arguments)[3]; - rhs = (*e.arguments)[4]; - } - - auto cae = new CatAssignExp(e.loc, lhs, rhs); - cae.type = e.type; - - result = interpretRegion(cae, istate, CTFEGoal.LValue); - return; - } - else if (fd.ident == Id._d_arrayappendcTX) - assert(0, "CTFE cannot interpret _d_arrayappendcTX!"); } else if (auto soe = ecall.isSymOffExp()) {