Beispiel #1
0
        public override LLVMRegister VisitReturnNode(ReturnNode n)
        {
            LLVMRegister retval = Visit(n.ret);

            emit.Emit("ret", retval);

            return(null);
        }
Beispiel #2
0
        public object VisitReturnNode(ReturnNode n)
        {
            WriteLine(n.kind);
            Indent();
            Visit(n.ret);
            Dedent();

            return(null);
        }
Beispiel #3
0
        public virtual T VisitReturnNode(ReturnNode n)
        {
            if (n.ret != null)
            {
                n.ret.Accept(this);
            }

            return(default(T));
        }
Beispiel #4
0
 public override object VisitReturnNode(ReturnNode n)
 {
     Visit(n.ret);
     if (!currentFunction.ReturnType.Equals(TypeSymbol.VOID_SYMBOL))
     {
         semanticChecker.CheckAndReport(currentFunction.ReturnType.Match(n.ret.Type), n.sourceLoc, "Returntype does not match return type of function");
     }
     else
     {
         semanticChecker.CheckAndReport(n.ret == null, n.sourceLoc, "Returning value from void-function");
     }
     return(null);
 }
Beispiel #5
0
 public override MIPSRegister VisitReturnNode(ReturnNode n)
 {
     emit.Emit("ret");
     return(null);
 }
Beispiel #6
0
 public override object VisitReturnNode(ReturnNode n)
 {
     Visit(n.ret);
     return(null);
 }
Beispiel #7
0
 public override bool VisitReturnNode(ReturnNode n)
 {
     return(true);
 }
Beispiel #8
0
            public override LData VisitReturnNode(ReturnNode n)
            {
                RetVal = Visit(n.ret);

                return(null);
            }