public string visit(Register n) { throw new NotImplementedException(); }
public abstract string visit(Register n);
public virtual string visit(Register n) { throw new NotImplementedException("Register is not implemented yet"); // Do nothing; leave the implementation to the main class }
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; }
public ASTType visit(Register n) { throw new NotImplementedException(); }