Package sun.tools.asm

Examples of sun.tools.asm.Label


    void codeOperation(Environment env, Context ctx, Assembler asm) {
        throw new CompilerError("codeOperation: " + opNames[op]);
    }
    public void codeValue(Environment env, Context ctx, Assembler asm) {
        if (type.isType(TC_BOOLEAN)) {
            Label l1 = new Label();
            Label l2 = new Label();

            codeBranch(env, ctx, asm, l1, true);
            asm.add(true, where, opc_ldc, new Integer(0));
            asm.add(true, where, opc_goto, l2);
            asm.add(l1);
View Full Code Here


          case DO:
          case WHILE:
          case FOR:
          case FINALLY:
          case SYNCHRONIZED:
            this.breakLabel = new Label();
            this.contLabel = new Label();
            break;
          case SWITCH:
          case TRY:
          case INLINEMETHOD:
          case INLINENEWINSTANCE:
            this.breakLabel = new Label();
            break;
          default:
            if ((node instanceof Statement) && (((Statement)node).labels != null)) {
                this.breakLabel = new Label();
            }
        }
    }
View Full Code Here

    public void code(Environment env, Context ctx, Assembler asm) {
        CodeContext newctx = new CodeContext(ctx, this);

        asm.add(where, opc_goto, newctx.contLabel);

        Label l1 = new Label();
        asm.add(l1);

        if (body != null) {
            body.code(env, newctx, asm);
        }
View Full Code Here

    void codeBranch(Environment env, Context ctx, Assembler asm, Label lbl, boolean whenTrue) {
        if (whenTrue) {
            left.codeBranch(env, ctx, asm, lbl, true);
            right.codeBranch(env, ctx, asm, lbl, true);
        } else {
            Label lbl2 = new Label();
            left.codeBranch(env, ctx, asm, lbl2, true);
            right.codeBranch(env, ctx, asm, lbl, false);
            asm.add(lbl2);
        }
    }
View Full Code Here

        LocalMember f1 = new LocalMember(where, clazz, 0, Type.tObject, null);
        LocalMember f2 = new LocalMember(where, clazz, 0, Type.tInt, null);
        Integer num1 = new Integer(ctx.declare(env, f1));
        Integer num2 = new Integer(ctx.declare(env, f2));

        Label endLabel = new Label();

        TryData td = new TryData();
        td.add(null);

        // lock the object
View Full Code Here

     * Code
     */
    public void code(Environment env, Context ctx, Assembler asm) {
        ctx = new Context(ctx);
        Integer num1 = null, num2 = null;
        Label endLabel = new Label();

        if (tryTemp != null) {
            ctx.declare(env, tryTemp);
        }
        if (init != null) {
View Full Code Here

            throw new CompilerError("codeBranch " + opNames[op]);
        }
    }
    public void codeValue(Environment env, Context ctx, Assembler asm) {
        if (type.isType(TC_BOOLEAN)) {
            Label l1 = new Label();
            Label l2 = new Label();

            codeBranch(env, ctx, asm, l1, true);
            asm.add(true, where, opc_ldc, new Integer(0));
            asm.add(true, where, opc_goto, l2);
            asm.add(l1);
View Full Code Here

            if (c.node.op == SYNCHRONIZED) {
                asm.add(where, opc_jsr, ((CodeContext)c).contLabel);
            } else if (c.node.op == FINALLY
                          && ((CodeContext)c).contLabel != null) {
                FinallyStatement st = ((FinallyStatement)(c.node));
                Label label = ((CodeContext)c).contLabel;
                if (st.finallyCanFinish) {
                    asm.add(where, opc_jsr, label);
                } else {
                    // the code never returns, so we're done.
                    asm.add(where, opc_goto, label);
View Full Code Here

    /**
     * Code
     */
    public void codeValue(Environment env, Context ctx, Assembler asm) {
        Label l1 = new Label();
        Label l2 = new Label();

        cond.codeBranch(env, ctx, asm, l1, false);
        left.codeValue(env, ctx, asm);
        asm.add(where, opc_goto, l2);
        asm.add(l1);
View Full Code Here

        asm.add(l1);
        right.codeValue(env, ctx, asm);
        asm.add(l2);
    }
    public void code(Environment env, Context ctx, Assembler asm) {
        Label l1 = new Label();
        cond.codeBranch(env, ctx, asm, l1, false);
        left.code(env, ctx, asm);
        if (right != null) {
            Label l2 = new Label();
            asm.add(where, opc_goto, l2);
            asm.add(l1);
            right.code(env, ctx, asm);
            asm.add(l2);
        } else {
View Full Code Here

TOP

Related Classes of sun.tools.asm.Label

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.