Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion question about global labels in imcc
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Togos  
View profile  
 More options Jan 19 2004, 3:48 pm
Newsgroups: perl.perl6.internals
From: chumps_53...@yahoo.com (Togos)
Date: Mon, 19 Jan 2004 12:16:11 -0800 (PST)
Local: Mon, Jan 19 2004 3:16 pm
Subject: question about global labels in imcc
Hi.

In IMCC, how can I get the address of a label in a
different compilation unit? Is there a way to do this
at compile time? I've looked through the latest docs
but according to imcc/docs/parsing.pod, global labels
get stored in global variables that you must look up
at run time (yuck).

It seems that newsub does some magic regarding this,
as

  .sub _main
    # This doesn't work
    set $I1, _baz
    print "_baz: "
    print $I1
    print "\n"

   _shindig:
    # But this does
    newsub $P1, .Sub, _baz
    get_addr $I1, $P1
    print "_baz (fancy): "
    print $I1
    print "\n"

    exit 0
  .end

  .sub _main2
   _baz:
    exit 0
  .end

outputs

  _baz: -1
  _baz (fancy): 136929824

Is there any way I can get that magic without having
to
actually create a new .Sub object?

thanks,
- TOGoS

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.