IvannosysTargetArch.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package common;
  7. /**
  8. *
  9. * @author Eugenio
  10. * @param
  11. */
  12. public interface IvannosysTargetArch {
  13. public void Init() throws Exception;
  14. public IvannosysTargetArch SetTAC(Code tac) throws Exception;
  15. public IvannosysTargetArch Compile() throws Exception;
  16. public IvannosysTargetArch Format() throws Exception;
  17. // Export gera a representacao fisica do codigo
  18. // Sua funcao é gerar o(s) arquivo(s) de saida
  19. public IvannosysTargetArch Export() throws Exception;
  20. // Metodos de traduzir tac para target
  21. public void Prolog(String id) throws Exception;
  22. public void Epilog(String id) throws Exception;
  23. public void TranslateLabel(Instruction inst) throws Exception;
  24. public void TranslateAssign(Instruction inst) throws Exception;
  25. public void TranslateJump(Instruction inst) throws Exception;
  26. public void TranslateCall(Instruction inst) throws Exception;
  27. public void TranslateReturn(Instruction inst) throws Exception;
  28. public void TranslatePushParam(Instruction inst) throws Exception;
  29. public void TranslatePushReturn(Instruction inst) throws Exception;
  30. public void TranslatePopReturn(Instruction inst) throws Exception;
  31. public void TranslatePopParam(Instruction inst) throws Exception;
  32. public void TranslateBranch(Instruction inst) throws Exception;
  33. public void TranslateUnary(Instruction inst) throws Exception;
  34. public void TranslateIndexedAssignment(Instruction inst) throws Exception;
  35. public void TranslateCopy(Instruction inst) throws Exception;
  36. public void TranslatePointerAssignment(Instruction inst) throws Exception;
  37. public void TranslateLoad(Instruction inst) throws Exception;
  38. public void TranslateStore(Instruction inst) throws Exception;
  39. }