Package org.formulacompiler.compiler.internal.expressions

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNode


    {
      final Label met = mv().newLabel();
      final int nArg = this.node.arguments().size();
      int iArg = 0;
      while (iArg < nArg - 1) {
        final ExpressionNode arg = this.node.arguments().get( iArg );
        new TestCompilerBranchingWhenTrue( arg, met ).compileTest();
        iArg++;
      }
      final ExpressionNode lastArg = this.node.arguments().get( iArg );
      new TestCompilerBranchingWhenFalse( lastArg, this.branchTo ).compileTest();
      mv().mark( met );
    }
View Full Code Here


    {
      final Label notMet = mv().newLabel();
      final int nArg = this.node.arguments().size();
      int iArg = 0;
      while (iArg < nArg - 1) {
        final ExpressionNode arg = this.node.arguments().get( iArg );
        new TestCompilerBranchingWhenFalse( arg, notMet ).compileTest();
        iArg++;
      }
      final ExpressionNode lastArg = this.node.arguments().get( iArg );
      new TestCompilerBranchingWhenTrue( lastArg, this.branchTo ).compileTest();
      mv().mark( notMet );
    }
View Full Code Here

      else {
        compileInput( cell.getCallChainToCall() );
      }
    }
    else {
      final ExpressionNode cellExpr = cell.getExpression();
      final ExpressionCompiler ec = expressionCompiler();
      if (null != cellExpr) {
        if (shouldCache( cell )) {
          compileCacheBegin();
          compileExpression( cellExpr );
View Full Code Here

  @Override
  protected void compileBody() throws CompilerException
  {
    assert ChainedFoldCompiler.isChainable( fold ) && !fold.isSpecialWhenEmpty();
    final ExpressionNode initNode = fold.accuInit( 0 );
    final DataType initType = initNode.getDataType();
    final Iterable<ExpressionNode> elts = apply.elements();
    final ExpressionNode initialElt = fold.mayReduceAndRearrange() ? firstLocalElementIn( elts ) : null;
    final ExpressionNode initial = (null != initialElt) ? initialElt : initNode;

    expressionCompiler().compile( initial );

    final String accName = fold.accuName( 0 );
    letDict().let( accName, initType, expressionCompiler().TOP_OF_STACK );
View Full Code Here

        } );
      }
      else {
        for (int iVec = 0; iVec < eltCount; iVec++) {
          final ExpressionNode elt = elts[ iVec ];
          letDict().let( fold.eltName( iVec ), elt.getDataType(), elt );
        }

        compileFoldStepsWithEltsBound();

        letDict().unlet( eltCount );
View Full Code Here

  private void verifyAllElementsReferenceTheSameSubSection( ExpressionNode[] _elts ) throws CompilerException
  {
    final ExpressionNodeForSubSectionModel sub = (ExpressionNodeForSubSectionModel) _elts[ 0 ];
    for (int iVec = 1; iVec < _elts.length; iVec++) {
      final ExpressionNode elt = _elts[ iVec ];
      if (elt instanceof ExpressionNodeForSubSectionModel) {
        final ExpressionNodeForSubSectionModel sub2 = (ExpressionNodeForSubSectionModel) elt;
        if (sub.getSectionModel() != sub2.getSectionModel()) {
          throw differentSubSections( sub, sub2 );
        }
View Full Code Here

  {
    final int nAccus = fold.accuCount();
    accuTypes = new Type[ nAccus ];
    accuVars = new int[ nAccus ];
    for (int i = 0; i < nAccus; i++) {
      final ExpressionNode initNode = fold.accuInit( i );
      final DataType initType = initNode.getDataType();
      final Type accuType = section().engineCompiler().typeCompiler( initType ).type();
      final int accuVar = newLocal( accuType.getSize() );
      accuTypes[ i ] = accuType;
      accuVars[ i ] = accuVar;
      expressionCompiler().compile( initNode );
View Full Code Here

TOP

Related Classes of org.formulacompiler.compiler.internal.expressions.ExpressionNode

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.