I'm assuming PMCNULL is the good (parrot) kind of null, and null is
the bad (well, to us, anyway) (C) kind.
I would hazard a guess that anything that is returning null instead
of PMCNULL is b0rken.
On Oct 4, 2007, at 10:38 AM, Patrick R. Michaud wrote:
When looking at a trace output (-t1), what's the difference
between "PMCNULL" and "(null)"? For example:
$ cat y.pir
.namespace ['Foo']
.sub main :main
$P1 = get_class ['Foo']
$P2 = $P1
$P0 = get_hll_namespace ['Foo']
$P1 = get_class $P0
$P2 = $P1
.end
$ ./parrot -t1 y.pir
0 get_class P1, PC4 P1=PMCNULL PC4=Key=PMC
(0x92b690)
3 set P2, P1 P2=PMCNULL P1=(null)
6 get_hll_namespace P0, PC4 P0=PMCNULL PC4=Key=PMC
(0x92b690)
9 get_class P1, P0 P1=(null) P0=NameSpace=PMC
(0x930e90)
12 set P2, P1 P2=(null) P1=(null)
15 end
$
Here I see both "PMCNULL" and "(null)" in the register values --
what's
the difference between them?
In particular, attempting to do
$P3 = new $P2
causes "Null PMC access in isa()" if $P2 is PMCNULL, but causes
a segmentation fault if $P2 is the mysterious (null) value.
Generating the "Null PMC access" exception is acceptable,
generating the segfault likely is not. :-)
Thanks!
Pm
--
Will "Coke" Coleda
[EMAIL PROTECTED]