Code that causes the problem:
class Test = ()(
class D = ()()
class C = Object <: D ()( )
public class A = C ()()
public class B = C ()()
)
public main: args = (
((Test new) A) new.
((Test new) B) new.
)
The problem only occurs when A and B have the same superclass, which has a mixin application.
Also, two different instances of the Test Class are needed for reproduction. The problem occurs during the instantiation of the B Object, the second Test instance is created without problems.
Stacktrace:
java.lang.AssertionError
at som.compiler.MixinDefinition.sameSuperAndMixins(MixinDefinition.java:193)
at som.compiler.MixinDefinition.getCached(MixinDefinition.java:259)
at som.compiler.MixinDefinition.createClassFactory(MixinDefinition.java:273)
at som.interpreter.nodes.InstantiationNode.createClassFactory(InstantiationNode.java:26)
at som.interpreter.nodes.InstantiationNode$ClassInstantiationNode.instantiateClassWithNewClassFactory(InstantiationNode.java:84)
at som.interpreter.nodes.InstantiationNodeFactory$ClassInstantiationNodeGen.executeAndSpecialize(InstantiationNodeFactory.java:105)
at som.interpreter.nodes.InstantiationNodeFactory$ClassInstantiationNodeGen.execute(InstantiationNodeFactory.java:66)
at som.interpreter.nodes.dispatch.ClassSlotAccessNode.instantiateClassObject(ClassSlotAccessNode.java:87)
at som.interpreter.nodes.dispatch.ClassSlotAccessNode.read(ClassSlotAccessNode.java:63)
at som.interpreter.nodes.dispatch.ClassSlotAccessNode.read(ClassSlotAccessNode.java:27)
at som.interpreter.nodes.dispatch.CachedSlotRead.executeDispatch(CachedSlotRead.java:47)
at som.interpreter.nodes.dispatch.UninitializedDispatchNode$AbstractUninitialized.executeDispatch(UninitializedDispatchNode.java:134)
at som.interpreter.nodes.MessageSendNode$GenericMessageSendNode.doPreEvaluated(MessageSendNode.java:313)
at som.interpreter.nodes.MessageSendNode$AbstractUninitializedMessageSendNode.doPreEvaluated(MessageSendNode.java:177)
at som.interpreter.nodes.MessageSendNode$AbstractMessageSendNode.executeGeneric(MessageSendNode.java:128)
at som.interpreter.nodes.MessageSendNode$AbstractUninitializedMessageSendNode.executeGeneric(MessageSendNode.java:169)
at som.interpreter.Invokable.execute(Invokable.java:51)
at com.oracle.truffle.api.impl.DefaultCallTarget.callDirectOrIndirect(DefaultCallTarget.java:64)
at com.oracle.truffle.api.impl.DefaultDirectCallNode.call(DefaultDirectCallNode.java:43)
at som.interpreter.nodes.dispatch.ClassSlotAccessNode.instantiateClassObject(ClassSlotAccessNode.java:86)
at som.interpreter.nodes.dispatch.ClassSlotAccessNode.read(ClassSlotAccessNode.java:63)
at som.interpreter.nodes.dispatch.ClassSlotAccessNode.read(ClassSlotAccessNode.java:27)
at som.interpreter.nodes.dispatch.CachedSlotRead.executeDispatch(CachedSlotRead.java:47)
at som.interpreter.nodes.dispatch.UninitializedDispatchNode$AbstractUninitialized.executeDispatch(UninitializedDispatchNode.java:134)
at som.interpreter.nodes.MessageSendNode$GenericMessageSendNode.doPreEvaluated(MessageSendNode.java:313)
at som.interpreter.nodes.MessageSendNode$AbstractUninitializedMessageSendNode.doPreEvaluated(MessageSendNode.java:177)
at som.interpreter.nodes.MessageSendNode$AbstractMessageSendNode.executeGeneric(MessageSendNode.java:128)
at som.interpreter.nodes.MessageSendNode$AbstractUninitializedMessageSendNode.executeGeneric(MessageSendNode.java:169)
at som.interpreter.nodes.MessageSendNode$AbstractMessageSendNode.evaluateArguments(MessageSendNode.java:135)
at som.interpreter.nodes.MessageSendNode$AbstractMessageSendNode.executeGeneric(MessageSendNode.java:127)
at som.interpreter.nodes.MessageSendNode$AbstractUninitializedMessageSendNode.executeGeneric(MessageSendNode.java:169)
at som.instrumentation.MessageSendNodeWrapper$MessageSendWrapper.executeGeneric(MessageSendNodeWrapper.java:71)
at som.interpreter.nodes.SequenceNode.executeAllButLast(SequenceNode.java:50)
at som.interpreter.nodes.SequenceNode.executeGeneric(SequenceNode.java:43)
Code that causes the problem:
The problem only occurs when A and B have the same superclass, which has a mixin application.
Also, two different instances of the Test Class are needed for reproduction. The problem occurs during the instantiation of the B Object, the second Test instance is created without problems.
Stacktrace: