12345678910111213141516171819202122232425262728293031323334 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package targets.mips;
- import API.CodeProcessorInterface;
- import common.Block;
- import common.Code;
- import java.util.LinkedHashMap;
- /**
- *
- * @author EUGENIO CARVALHO
- */
- public class MipsCopyDepsProcessor implements CodeProcessorInterface {
- protected Code tac;
- public MipsCopyDepsProcessor() {
- }
- @Override
- public void Exec(Code c, LinkedHashMap<String, CodeProcessorInterface> cp) throws Exception {
- Block currentBlock = c.Block(),
- tacBlock = c.Parent.getBlocks().get(currentBlock.getName());
- // System.out.println("EXEC COPY DEPS:" + currentBlock.getName() + "\n" + tacBlock.GetDependences());
- for (String dep : tacBlock.GetDependences()) {
- currentBlock.AddDependence(dep);
- }
- }
- }
|