P6metaclass cannot derive from already-`register`ed PMC type #680

aghast opened this Issue Mar 21, 2010 · 0 comments


None yet

1 participant

aghast commented Mar 21, 2010

Registering a PMC-proxy seems to be enough to prevent its use as a parent class.

austin@andLinux:~/kakapo$ cat test.nqp

class Foo is Hash {
    INIT { say("Hello, Foo"); }
austin@andLinux:~/kakapo$ parrot-nqp test.nqp
Could not build C3 linearization: ambiguous hierarchy
current instr.: 'parrot;P6metaclass;register' pc 532 (runtime/parrot/library/P6object.pir:408)
called from Sub '' pc -1 ((unknown file):-1)
called from Sub 'parrot;PCT;HLLCompiler;evalpmc' pc 972 (compilers/pct/src/PCT/HLLCompiler.pir:538)
... call repeated 1 times
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 388 (compilers/pct/src/PCT/HLLCompiler.pir:287)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 992 (compilers/pct/src/PCT/HLLCompiler.pir:556)
called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1303 (compilers/pct/src/PCT/HLLCompiler.pir:707)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1489 (compilers/pct/src/PCT/HLLCompiler.pir:794)
called from Sub 'parrot;NQP;Compiler;main' pc -1 ((unknown file):-1)

I suspect (based on scanning a trace, but not based on ''poring over'' the trace) that the problem lies in the get_parrotclass method.

The '''major''' impact for me is interoperation between the Kakapo library, which registers a large collection of PMC types, and the PCT/PGE tools, which build many of their classes as subtypes of Hash.

Originally http://trac.parrot.org/parrot/ticket/1520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment