Package org.formulacompiler.compiler.internal.bytecode

Source Code of org.formulacompiler.compiler.internal.bytecode.ExpressionCompilerForAll_Generated

/**
* DO NOT MODIFY! This file is generated automatically from org.formulacompiler.compiler.internal.templates.ExpressionTemplatesForAll.
* Generated using jdk-1.5.0_22.
*/
package org.formulacompiler.compiler.internal.bytecode;

import org.objectweb.asm.Label;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.commons.GeneratorAdapter;

import org.formulacompiler.runtime.ComputationMode;
import org.formulacompiler.compiler.CompilerException;
import org.formulacompiler.compiler.Operator;
import org.formulacompiler.compiler.NumericType;
import org.formulacompiler.compiler.internal.expressions.ExpressionNode;
import org.formulacompiler.compiler.internal.expressions.ExpressionNodeForFunction;


@SuppressWarnings("unused")
abstract class ExpressionCompilerForAll_Generated extends ExpressionCompilerForAll_Base
{

  public ExpressionCompilerForAll_Generated(MethodCompiler _methodCompiler)
  {
    super( _methodCompiler );
  }

  protected final void compile_util_unboxByte() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxByte", "(Ljava/lang/Byte;)B" );
  }

  protected final void compile_util_unboxShort() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxShort", "(Ljava/lang/Short;)S" );
  }

  protected final void compile_util_unboxInteger() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxInteger", "(Ljava/lang/Integer;)I" );
  }

  protected final void compile_util_unboxLong() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxLong", "(Ljava/lang/Long;)J" );
  }

  protected final void compile_util_unboxFloat() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxFloat", "(Ljava/lang/Float;)F" );
  }

  protected final void compile_util_unboxDouble() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxDouble", "(Ljava/lang/Double;)D" );
  }

  protected final void compile_util_unboxCharacter() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxCharacter", "(Ljava/lang/Character;)C" );
  }

  protected final void compile_util_unboxBoolean() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "org/formulacompiler/runtime/internal/Runtime_v2", "unboxBoolean", "(Ljava/lang/Boolean;)Z" );
  }

  protected final void compile_util_boxByte() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;" );
  }

  protected final void compile_util_boxShort() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Short", "valueOf", "(S)Ljava/lang/Short;" );
  }

  protected final void compile_util_boxInteger() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;" );
  }

  protected final void compile_util_boxLong() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Long", "valueOf", "(J)Ljava/lang/Long;" );
  }

  protected final void compile_util_boxFloat() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Float", "valueOf", "(F)Ljava/lang/Float;" );
  }

  protected final void compile_util_boxDouble() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Double", "valueOf", "(D)Ljava/lang/Double;" );
  }

  protected final void compile_util_boxCharacter() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Character", "valueOf", "(C)Ljava/lang/Character;" );
  }

  protected final void compile_util_boxBoolean() throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    mv.visitMethodInsn( Opcodes.INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;" );
  }

  protected final void compile_util_createSectionInfo( java.lang.String _b, java.lang.String _c, int _d, int _e, java.lang.String _f, int _g, int _h ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    incLocalsOffset( 4 );
    Label l_0 = new Label();
    Label l_1 = new Label();
    mv.visitVarInsn( Opcodes.ISTORE, 0 + loc );
    mv.push( _c );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ASTORE, 4 + loc );
    mv.visitJumpInsn( Opcodes.IFNULL, l_0 );
    mv.push( _f );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ASTORE, 5 + loc );
    mv.visitJumpInsn( Opcodes.IFNULL, l_0 );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/internal/spreadsheet/CellAddressImpl" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 4 + loc );
    mv.push( _e );
    mv.push( _d );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/internal/spreadsheet/CellAddressImpl", "<init>", "(Ljava/lang/String;II)V" );
    mv.visitVarInsn( Opcodes.ASTORE, 2 + loc );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/internal/spreadsheet/CellAddressImpl" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 5 + loc );
    mv.push( _h );
    mv.push( _g );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/internal/spreadsheet/CellAddressImpl", "<init>", "(Ljava/lang/String;II)V" );
    mv.visitVarInsn( Opcodes.ASTORE, 3 + loc );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/internal/spreadsheet/RangeAddressImpl" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 2 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 3 + loc );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/internal/spreadsheet/RangeAddressImpl", "<init>", "(Lorg/formulacompiler/runtime/spreadsheet/CellAddress;Lorg/formulacompiler/runtime/spreadsheet/CellAddress;)V" );
    mv.visitVarInsn( Opcodes.ASTORE, 1 + loc );
    mv.visitJumpInsn( Opcodes.GOTO, l_1 );
    mv.visitLabel( l_0 );
    mv.visitInsn( Opcodes.ACONST_NULL );
    mv.visitVarInsn( Opcodes.ASTORE, 1 + loc );
    mv.visitLabel( l_1 );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/internal/spreadsheet/SectionInfoImpl" );
    mv.visitInsn( Opcodes.DUP );
    mv.push( _b );
    mv.visitVarInsn( Opcodes.ALOAD, 1 + loc );
    mv.visitVarInsn( Opcodes.ILOAD, 0 + loc );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/internal/spreadsheet/SectionInfoImpl", "<init>", "(Ljava/lang/String;Lorg/formulacompiler/runtime/spreadsheet/RangeAddress;I)V" );
  }

  protected final void compile_util_log( java.lang.String _b, int _c, int _d, java.lang.String _e, boolean _f, boolean _g ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    incLocalsOffset( 5 );
    mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
    compile_environment();
    mv.visitMethodInsn( Opcodes.INVOKEVIRTUAL, "org/formulacompiler/runtime/internal/Environment", "computationListener", "()Lorg/formulacompiler/runtime/event/CellComputationListener;" );
    mv.visitVarInsn( Opcodes.ASTORE, 1 + loc );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/internal/spreadsheet/CellAddressImpl" );
    mv.visitInsn( Opcodes.DUP );
    mv.push( _b );
    mv.push( _c );
    mv.push( _d );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/internal/spreadsheet/CellAddressImpl", "<init>", "(Ljava/lang/String;II)V" );
    mv.visitVarInsn( Opcodes.ASTORE, 2 + loc );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/internal/spreadsheet/CellInfoImpl" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 2 + loc );
    mv.push( _e );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/internal/spreadsheet/CellInfoImpl", "<init>", "(Lorg/formulacompiler/runtime/spreadsheet/CellAddress;Ljava/lang/String;)V" );
    mv.visitVarInsn( Opcodes.ASTORE, 3 + loc );
    mv.visitTypeInsn( Opcodes.NEW, "org/formulacompiler/runtime/spreadsheet/SpreadsheetCellComputationEvent" );
    mv.visitInsn( Opcodes.DUP );
    mv.visitVarInsn( Opcodes.ALOAD, 3 + loc );
    compile_sectionInfo();
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
    mv.push( _f );
    mv.push( _g );
    mv.visitMethodInsn( Opcodes.INVOKESPECIAL, "org/formulacompiler/runtime/spreadsheet/SpreadsheetCellComputationEvent", "<init>", "(Lorg/formulacompiler/runtime/spreadsheet/CellInfo;Lorg/formulacompiler/runtime/spreadsheet/SectionInfo;Ljava/lang/Object;ZZ)V" );
    mv.visitVarInsn( Opcodes.ASTORE, 4 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 1 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 4 + loc );
    mv.visitMethodInsn( Opcodes.INVOKEINTERFACE, "org/formulacompiler/runtime/event/CellComputationListener", "cellCalculated", "(Lorg/formulacompiler/runtime/event/CellComputationEvent;)V" );
  }

  protected final void compile_scanArray( ForEachElementCompilation _forElement ) throws CompilerException
  {
    final GeneratorAdapter mv = mv();
    final int loc = localsOffset();
    incLocalsOffset( 4 );
    Label l_0 = new Label();
    Label l_1 = new Label();
    mv.visitVarInsn( Opcodes.ASTORE, 0 + loc );
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
    mv.visitInsn( Opcodes.ARRAYLENGTH );
    mv.visitVarInsn( Opcodes.ISTORE, 1 + loc );
    mv.visitInsn( Opcodes.ICONST_0 );
    mv.visitVarInsn( Opcodes.ISTORE, 2 + loc );
    mv.visitLabel( l_1 );
    mv.visitVarInsn( Opcodes.ILOAD, 2 + loc );
    mv.visitVarInsn( Opcodes.ILOAD, 1 + loc );
    mv.visitJumpInsn( Opcodes.IF_ICMPGE, l_0 );
    mv.visitVarInsn( Opcodes.ALOAD, 0 + loc );
    mv.visitVarInsn( Opcodes.ILOAD, 2 + loc );
    mv.visitInsn( Opcodes.AALOAD );
    mv.visitVarInsn( Opcodes.ASTORE, 3 + loc );
    _forElement.compile( 3 + loc );
    mv.visitIincInsn( 2 + loc, 1 );
    mv.visitJumpInsn( Opcodes.GOTO, l_1 );
    mv.visitLabel( l_0 );
  }

}
TOP

Related Classes of org.formulacompiler.compiler.internal.bytecode.ExpressionCompilerForAll_Generated

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.