Ejemplo n.º 1
0
 public string visit(Register n)
 {
     throw new NotImplementedException();
 }
 public abstract string visit(Register n);
Ejemplo n.º 3
0
 public virtual string visit(Register n)
 {
     throw new NotImplementedException("Register is not implemented yet");
     // Do nothing; leave the implementation to the main class
 }
Ejemplo n.º 4
0
 public override string visit(Register n)
 {
     switch (n.Value)
     {
         case Global.Registers.STACKBASEPOINTER: return "%rbp";
         case Global.Registers.ACCUMULATOR: return "%rax";
         case Global.Registers.BASE: return "%rbx";
         case Global.Registers.COUNTER: return "%rcx";
         case Global.Registers.DATA: return "%rdx";
         case Global.Registers.STACKPOINTER: return "%rsp";
         case Global.Registers.DEST_INDEX: return "%rdi";
         case Global.Registers.SRC_INDEX: return "%rsi";
         default: Swift.error(new InternalError("Internal error in swift: trying to access unexisting register")); break;
     }
     return null;
 }
Ejemplo n.º 5
0
 public ASTType visit(Register n)
 {
     throw new NotImplementedException();
 }