Class ObjectImplementor
java.lang.Object
ai.timefold.jpyinterpreter.implementors.ObjectImplementor
Implementations of opcodes related to objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteAttribute(FunctionMetadata functionMetadata, org.objectweb.asm.MethodVisitor methodVisitor, String className, StackMetadata stackMetadata, PythonBytecodeInstruction instruction) Deletes co_names[instruction.arg] of TOSstatic voidgetAttribute(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int nameIndex) Replaces TOS with getattr(TOS, co_names[instruction.arg])static voidgetSuperAttribute(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int nameIndex, boolean isLoadMethod) Implement (super = TOS2)(TOS1, TOS).attrstatic voidsetAttribute(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].
-
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
-