Package com.googlecode.aviator.asm

Examples of com.googlecode.aviator.asm.Label


            }
            return sb.toString();
        }

        protected final Label getLabel(final Object label) {
            Label lbl = (Label) labels.get(label);
            if (lbl == null) {
                lbl = new Label();
                labels.put(label, lbl);
            }
            return lbl;
        }
View Full Code Here


     * Make a label
     *
     * @return
     */
    private Label makeLabel() {
        return new Label();
    }
View Full Code Here

     */
    public void onAndLeft(Token<?> lookhead) {
        loadEnv();
        mv.visitMethodInsn(INVOKEVIRTUAL, "com/googlecode/aviator/runtime/type/AviatorObject", "booleanValue",
            "(Ljava/util/Map;)Z");
        Label l0 = new Label();
        l0stack.push(l0);
        mv.visitJumpInsn(IFEQ, l0);

        popOperand(); // boolean object
        popOperand(); // environment
View Full Code Here

            "(Ljava/util/Map;)Z");
        mv.visitJumpInsn(IFEQ, l0stack.peek());
        // Result is true
        mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorBoolean", "TRUE",
            "Lcom/googlecode/aviator/runtime/type/AviatorBoolean;");
        Label l1 = new Label();
        mv.visitJumpInsn(GOTO, l1);
        mv.visitLabel(l0stack.pop());
        // Result is false
        mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorBoolean", "FALSE",
            "Lcom/googlecode/aviator/runtime/type/AviatorBoolean;");
View Full Code Here

    public void onTernaryBoolean(Token<?> lookhead) {
        loadEnv();
        mv.visitMethodInsn(INVOKEVIRTUAL, "com/googlecode/aviator/runtime/type/AviatorObject", "booleanValue",
            "(Ljava/util/Map;)Z");
        Label l0 = new Label();
        Label l1 = new Label();
        l0stack.push(l0);
        l1stack.push(l1);
        mv.visitJumpInsn(IFEQ, l0);
        popOperand();
        popOperand();
View Full Code Here

     */
    public void onJoinRight(Token<?> lookhead) {
        loadEnv();
        mv.visitMethodInsn(INVOKEVIRTUAL, "com/googlecode/aviator/runtime/type/AviatorObject", "booleanValue",
            "(Ljava/util/Map;)Z");
        Label l1 = new Label();
        mv.visitJumpInsn(IFNE, l0stack.peek());
        // Result is False
        mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorBoolean", "FALSE",
            "Lcom/googlecode/aviator/runtime/type/AviatorBoolean;");
        mv.visitJumpInsn(GOTO, l1);
View Full Code Here

     */
    public void onJoinLeft(Token<?> lookhead) {
        loadEnv();
        mv.visitMethodInsn(INVOKEVIRTUAL, "com/googlecode/aviator/runtime/type/AviatorObject", "booleanValue",
            "(Ljava/util/Map;)Z");
        Label l0 = new Label();
        l0stack.push(l0);
        mv.visitJumpInsn(IFNE, l0);

        popOperand();
        popOperand();
View Full Code Here

    private void doCompareAndJump(int ints) {
        loadEnv();
        mv.visitMethodInsn(INVOKEVIRTUAL, "com/googlecode/aviator/runtime/type/AviatorObject", "compare",
            "(Lcom/googlecode/aviator/runtime/type/AviatorObject;Ljava/util/Map;)I");
        Label l0 = makeLabel();
        Label l1 = makeLabel();
        mv.visitJumpInsn(ints, l0);
        mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorBoolean", "TRUE",
            "Lcom/googlecode/aviator/runtime/type/AviatorBoolean;");
        mv.visitJumpInsn(GOTO, l1);
        mv.visitLabel(l0);
View Full Code Here

TOP

Related Classes of com.googlecode.aviator.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.