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

Reply via email to