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 Symbol naming and imcc2
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
 
Melvin Smith  
View profile  
 More options Feb 11 2004, 12:48 pm
Newsgroups: perl.perl6.internals
From: mrjoltc...@mindspring.com (Melvin Smith)
Date: Wed, 11 Feb 2004 12:26:16 -0500
Local: Wed, Feb 11 2004 12:26 pm
Subject: [RFD] Symbol naming and imcc2
RFD = Request For Discussion ;)

Much discussion has been made on IRC concerning
symbol names.

The request, mainly, is for imcc to handle sigil characters
from other languages which basically equates to exposing
a lot to imcc from the high-level language. I won't
argue how much of that is good or bad; I'd rather just try to
make imcc as friendly as possible.

The state of things:

1) Declared symbols can be handled pretty easily with any character
we want to support, imcc just has to track it. It just so happens
that we don't allow many non alpha characters at this time.

2) $ is currently used to denote a symbolic register ($I[0-9]+ is an int
register).
which is not pre-declared. It just pops up in the instruction stream and
imcc assigns a register.

It is possible that we can stick with $ for temporaries, but make imcc
check symbol tables first, and allow people to declare symbols with $
as well. This would solve some issues but might make for some
confusing looking code.

In reality it would not really be that confusing if you don't know your
variables the same convention as temporaries, but who can guarantee
that.

.local PerlString $str
.local PerlString $I123
$I123 = "help"
$str = $I123
$I124 = 1 + 2
$125 = $124 * 3

The $ no longer stands out as a temporary, so maybe we choose a different
character for temp registers (I have suggested using a period C<.>)

.local PerlString $str
.local PerlString $I123
$I123 = "help"
$str = $I123
.i124 = 1 + 2
.i125 = .i124 * 3

Another option is to use quotes for symbols with sigils, but since most
of our code will end up coming from Perl6, that won't be optimizing
for the common case.

Finally, I for one, support name mangling. Its arguable how much high
level compilers should expose to the back-end compiler. I think, though,
that most people prefer to be able to debug PIR code and see the
original symbols, and I sympathize.

This is just an example to stimulate discussion. I'd like to hear all sides
before making any decisions.

(And remember namespaces when considering solutions)

-Melvin


 
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.