On Sat, 9 Aug 2003, Leopold Toetsch wrote:

> Nice coincidence. S. Togos' bug report too.
> Anyway, its already fixed.

Gosh you're quick. Thanks!

Want another one? :)

      def g():
          return 0
      def f():
          return g()
      print f()


This prints:

  'No more I register frames to pop!'


I was hoping those two were the same problem, 
but it doesn't look like it. This happens any 
time one function calls another, whether it passes
in arguments or not. The bug seems to happen on
the "return 0" line.

(It may very well be my generated code, but I 
can't find it if it is)

##############################

.sub __main__
    new_pad 0
    setline 1                     # (set_lineno:81)
    newsub $P0, .Sub, _sub0       # (genFunction:378)
    store_lex -1, 'g', $P0        # (genFunction:380)
    setline 3                     # (set_lineno:81)
    newsub $P1, .Sub, _sub1       # (genFunction:378)
    store_lex -1, 'f', $P1        # (genFunction:380)
    find_lex $P5, 'f'             # (callingExpression:325)
    newsub $P6, .Continuation, ret1# (callingExpression:331)
    .pcc_begin non_prototyped     # (callingExpression:332)
    .pcc_call $P5, $P6            # (callingExpression:335)
ret1:
    .result $P4                   # (callingExpression:338)
    .pcc_end                      # (callingExpression:339)
    .arg $P4                      # (visitPrint:394)
    call __py__print              # (visitPrint:395)
    print "\n"                    # (visitPrintnl:403)
    end                           # (compile:574)
.end
.include 'pirate.imc'

# g from line 1
.pcc_sub _sub0 non_prototyped
    .local object res0            # (visitReturn:528)
    res0 = new PerlInt            # (expressConstant:153)
    res0 = 0                      # (expressConstant:154)
    .pcc_begin_return             # (visitReturn:530)
    .return res0                  # (visitReturn:531)
    .pcc_end_return               # (visitReturn:532)
.end


# f from line 3
.pcc_sub _sub1 non_prototyped
    .local object res1            # (visitReturn:528)
    find_lex $P2, 'g'             # (callingExpression:325)
    newsub $P3, .Continuation, ret0# (callingExpression:331)
    .pcc_begin non_prototyped     # (callingExpression:332)
    .pcc_call $P2, $P3            # (callingExpression:335)
ret0:
    .result res1                  # (callingExpression:338)
    .pcc_end                      # (callingExpression:339)
    .pcc_begin_return             # (visitReturn:530)
    .return res1                  # (visitReturn:531)
    .pcc_end_return               # (visitReturn:532)
.end



Sincerely,
 
Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: [EMAIL PROTECTED]
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------


Reply via email to