Class Statement

    • Field Detail

      • DEAD_END

        public static final Vset DEAD_END
      • empty

        public static final Statement empty
        An empty statement. Its costInline is infinite.
      • MAXINLINECOST

        public static final int MAXINLINECOST
        The largest possible interesting inline cost value.
    • Constructor Detail

      • Statement

        Statement​(int op,
                  long where)
        Constructor
    • Method Detail

      • insertStatement

        public static Statement insertStatement​(Statement s1,
                                                Statement s2)
        Insert a bit of code at the front of a statement. Side-effect s2, if it is a CompoundStatement.
      • checkMethod

        public Vset checkMethod​(Environment env,
                                Context ctx,
                                Vset vset,
                                java.util.Hashtable<java.lang.Object,​java.lang.Object> exp)
        Check a statement
      • checkDeclaration

        Vset checkDeclaration​(Environment env,
                              Context ctx,
                              Vset vset,
                              int mod,
                              Type t,
                              java.util.Hashtable<java.lang.Object,​java.lang.Object> exp)
      • checkLabel

        protected void checkLabel​(Environment env,
                                  Context ctx)
        Make sure the labels on this statement do not duplicate the labels on any enclosing statement. Provided as a convenience for subclasses.
      • check

        Vset check​(Environment env,
                   Context ctx,
                   Vset vset,
                   java.util.Hashtable<java.lang.Object,​java.lang.Object> exp)
      • checkBlockStatement

        Vset checkBlockStatement​(Environment env,
                                 Context ctx,
                                 Vset vset,
                                 java.util.Hashtable<java.lang.Object,​java.lang.Object> exp)
        This is called in contexts where declarations are valid.
      • codeFinally

        void codeFinally​(Environment env,
                         Context ctx,
                         Assembler asm,
                         Context stopctx,
                         Type save)
        Generate the code to call all finally's for a break, continue, or return statement. We must call "jsr" on all the cleanup code between the current context "ctx", and the destination context "stopctx". If 'save' isn't null, there is also a value on the top of the stack
      • hasLabel

        public boolean hasLabel​(Identifier lbl)
      • firstConstructor

        public Expression firstConstructor()
        Check if the first thing is a constructor invocation
      • copyInline

        public Statement copyInline​(Context ctx,
                                    boolean valNeeded)
        Create a copy of the statement for method inlining
      • printIndent

        void printIndent​(java.io.PrintStream out,
                         int indent)
        Print
      • print

        public void print​(java.io.PrintStream out,
                          int indent)
      • print

        public void print​(java.io.PrintStream out)
        Description copied from class: Node
        Print
        Overrides:
        print in class Node