From da9bc742e50e829f2136e58178aa8e5ddd5b8f8c Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sun, 20 Feb 2022 15:36:22 +0200 Subject: [PATCH] Constrain FuncCallInstr evaluation (for arguyments) to only being value-deriving instructions --- source/tlang/compiler/codegen/instruction.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/tlang/compiler/codegen/instruction.d b/source/tlang/compiler/codegen/instruction.d index b9773821..82e733e1 100644 --- a/source/tlang/compiler/codegen/instruction.d +++ b/source/tlang/compiler/codegen/instruction.d @@ -144,7 +144,7 @@ public class CallInstr : Value public class FuncCallInstr : CallInstr { /* Per-argument instrructions */ - private Instruction[] evaluationInstructions; + private Value[] evaluationInstructions; private string functionName; @@ -164,13 +164,13 @@ public class FuncCallInstr : CallInstr addInfo = "FunctionName: "~functionName ~" EvalInstrs: "~ to!(string)(getEvaluationInstructions()); } - public void setEvalInstr(ulong argPos, Instruction instr) + public void setEvalInstr(ulong argPos, Value instr) { evaluationInstructions[argPos] = instr; updateAddInfo(); } - public Instruction[] getEvaluationInstructions() + public Value[] getEvaluationInstructions() { return evaluationInstructions; }