Package org.apache.derby.iapi.services.compiler

Examples of org.apache.derby.iapi.services.compiler.MethodBuilder.push()


         ! cb.statementNumHitLimit(1))
      {


        cb.getField(field); // instance
        cb.push(index + 1); // first arg;

        rc.generateExpression(acb, cb);
        cb.cast(ClassName.DataValueDescriptor); // second arg
        cb.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
        continue;
View Full Code Here


        savedItem = acb.addItem(rl);
               
        // get the RowLocation template
        exprFun.getField(lf); // instance for setColumn
        exprFun.push(highestColumnNumber + 1); // first arg

        exprFun.pushThis(); // instance for getRowLocationTemplate
        exprFun.push(savedItem); // first arg
        exprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getRowLocationTemplate",
                  ClassName.RowLocation, 1);
View Full Code Here

        // get the RowLocation template
        exprFun.getField(lf); // instance for setColumn
        exprFun.push(highestColumnNumber + 1); // first arg

        exprFun.pushThis(); // instance for getRowLocationTemplate
        exprFun.push(savedItem); // first arg
        exprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Activation, "getRowLocationTemplate",
                  ClassName.RowLocation, 1);

        exprFun.upCast(ClassName.DataValueDescriptor);
        exprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn",
View Full Code Here

        // r.setColumn(columnNumber, columnShape);
        //
        // This assumes that there are no "holes" in the column positions,
        // and that column positions reflect the stored format/order
      exprFun.getField(lf); // instance
      exprFun.push(colNum + 1); // first arg
      rc.generateHolder(acb, exprFun);

      exprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);

      // If there is a bit map of referenced columns, use it to
View Full Code Here

    //   fieldX = getExecutionFactory().getValueRow(# cols);

    MethodBuilder cb = acb.getConstructor();

    acb.pushGetExecutionFactoryExpression(cb); // instance
    cb.push(numCols);
    cb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null,
              rowAllocatorMethod, rowAllocatorType, 1);
    cb.setField(field);
    /* Increase the statement counter in constructor.  Code size in
     * constructor can become too big (more than 64K) for Java compiler
View Full Code Here

  {
    if (indexOfSessionTableNamesInSavedObjects != -1 ) //if this cursor references session schema tables, do following
    {
      MethodBuilder constructor = acb.getConstructor();
      constructor.pushThis();
      constructor.push(indexOfSessionTableNamesInSavedObjects);
      constructor.putField(org.apache.derby.iapi.reference.ClassName.BaseActivation, "indexOfSessionTableNamesInSavedObjects", "int");
      constructor.endStatement();
    }

    // generate the parameters
View Full Code Here

    //   java.lang.Object userExprFun( ) { }
    MethodBuilder userExprFun = ecb.newUserExprFun();

        /* Push the the current row onto the stack. */
        userExprFun.pushThis();
        userExprFun.push( rsNumber );
        userExprFun.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "getCurrentRow", ClassName.Row, 1);

    // Loop through the result columns, computing generated columns
        // as we go.
        int     size = rcl.size();
View Full Code Here

            ResultColumn    rc = (ResultColumn) rcl.elementAt( i );

            if ( !rc.hasGenerationClause() ) { continue; }

            userExprFun.dup();       // instance (current row)
            userExprFun.push(i + 1); // arg1

            rc.generateExpression(ecb, userExprFun);
            userExprFun.cast(ClassName.DataValueDescriptor);
               
            userExprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
View Full Code Here

    //   java.lang.Object userExprFun( ) { }
    MethodBuilder userExprFun = ecb.newUserExprFun();

        /* Push the the current row onto the stack. */
        userExprFun.pushThis();
        userExprFun.push( rsNumber );
        userExprFun.callMethod(VMOpcode.INVOKEVIRTUAL, ClassName.BaseActivation, "getCurrentRow", ClassName.Row, 1);

    // Loop through the result columns, computing generated columns
        // as we go.
        int     size = rcl.size();
View Full Code Here

            ResultColumn    rc = (ResultColumn) rcl.elementAt( i );

            if ( !rc.hasGenerationClause() ) { continue; }

            userExprFun.dup();       // instance (current row)
            userExprFun.push(i + 1); // arg1

            rc.generateExpression(ecb, userExprFun);
            userExprFun.cast(ClassName.DataValueDescriptor);
               
            userExprFun.callMethod(VMOpcode.INVOKEINTERFACE, ClassName.Row, "setColumn", "void", 2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.