Implement if statements with equality
This commit is contained in:
@@ -50,6 +50,10 @@ allocate MachineConfiguration{..} = fmap function
|
||||
= DivisionQuadruple (operand operand1) (operand operand2)
|
||||
$ Store
|
||||
$ temporaryRegisters !! fromIntegral index
|
||||
quadruple (LabelQuadruple label) = LabelQuadruple label
|
||||
quadruple (GoToQuadruple label) = GoToQuadruple label
|
||||
quadruple (EqualQuadruple operand1 operand2 goToLabel) =
|
||||
EqualQuadruple (operand operand1) (operand operand2) goToLabel
|
||||
operand :: Operand Variable -> Operand (Store r)
|
||||
operand (IntOperand x) = IntOperand x
|
||||
operand (VariableOperand (TempVariable index))
|
||||
|
||||
Reference in New Issue
Block a user