Class NormalInstanceVariableCompiler

java.lang.Object
org.jruby.ir.targets.simple.NormalInstanceVariableCompiler
All Implemented Interfaces:
InstanceVariableCompiler

public class NormalInstanceVariableCompiler extends Object implements InstanceVariableCompiler
  • Field Details

  • Constructor Details

    • NormalInstanceVariableCompiler

      public NormalInstanceVariableCompiler(IRBytecodeAdapter compiler)
  • Method Details

    • putField

      public void putField(String name)
      Description copied from interface: InstanceVariableCompiler
      Store instance variable into self.

      Stack required: self, value Stack result: empty

      Specified by:
      putField in interface InstanceVariableCompiler
      Parameters:
      name - name of variable to store
    • getField

      public void getField(String name)
      Description copied from interface: InstanceVariableCompiler
      Load instance variable from self.

      Stack required: self Stack result: value from self

      Specified by:
      getField in interface InstanceVariableCompiler
      Parameters:
      name - name of variable to load
    • cacheVariableAccessor

      private void cacheVariableAccessor(String name, boolean write)
      Retrieve the proper variable accessor for the given arguments. The source object is expected to be on stack.
      Parameters:
      name - name of the variable
      write - whether the accessor will be used for a write operation