Class SingleInstructionInline

java.lang.Object
org.jfuncmachine.compiler.model.InlineFunction
org.jfuncmachine.compiler.model.inline.SingleInstructionInline

public class SingleInstructionInline extends InlineFunction
Represents an inline function that generates a single instruction
  • Field Details

    • opcode

      public final int opcode
      The opcode that this function executes
  • Constructor Details

    • SingleInstructionInline

      public SingleInstructionInline(Type[] parameterTypes, Type returnType, int opcode)
      Create a new single instruction inline
      Parameters:
      parameterTypes - The parameter types of the function
      returnType - The return type of the function
      opcode - The opcode that this function executes
  • Method Details

    • generate

      public void generate(ClassGenerator generator, Environment env)
      Description copied from class: InlineFunction
      Generate the byte code for the function
      Specified by:
      generate in class InlineFunction
      Parameters:
      generator - The class generator current being used to generate the class
      env - The symbol environment available to this function