Class ObjectImplementor

java.lang.Object
ai.timefold.jpyinterpreter.implementors.ObjectImplementor

public class ObjectImplementor extends Object
Implementations of opcodes related to objects
  • Constructor Details

    • ObjectImplementor

      public ObjectImplementor()
  • Method Details

    • getAttribute

      public static void getAttribute(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int nameIndex)
      Replaces TOS with getattr(TOS, co_names[instruction.arg])
    • deleteAttribute

      public static void deleteAttribute(FunctionMetadata functionMetadata, org.objectweb.asm.MethodVisitor methodVisitor, String className, StackMetadata stackMetadata, PythonBytecodeInstruction instruction)
      Deletes co_names[instruction.arg] of TOS
    • setAttribute

      public static void setAttribute(FunctionMetadata functionMetadata, org.objectweb.asm.MethodVisitor methodVisitor, String className, StackMetadata stackMetadata, PythonBytecodeInstruction instruction, LocalVariableHelper localVariableHelper)
      Implement TOS.name = TOS1, where name is co_names[instruction.arg]. TOS and TOS1 are popped.
    • getSuperAttribute

      public static void getSuperAttribute(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int nameIndex, boolean isLoadMethod)
      Implement (super = TOS2)(TOS1, TOS).attr