Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parrot config - a small perl task

4 views
Skip to first unread message

Leopold Toetsch

unread,
Jul 16, 2004, 1:42:59 AM7/16/04
to Perl 6 Internals
Our types configuration is still using perl5's type sizes. This breaks
default Configure.pl runs on various architectures, that ship a perl
with "long long" intvals.

Using perl's was needed a long time ago, when packfiles were generated
by perl. It's not needed any more.

So the job is to fix that and use the natural wordsize of the machine:

On (AFAIK) all systems: opcode_type = intval_type = long. This size has
to match the pointer size. And floatval_type = double.

Thanks,
leo

Brent 'Dax' Royal-Gordon

unread,
Jul 16, 2004, 5:14:29 AM7/16/04
to Leopold Toetsch, Perl 6 Internals
Leopold Toetsch wrote:
> On (AFAIK) all systems: opcode_type = intval_type = long. This size has
> to match the pointer size. And floatval_type = double.

Very small, as it turns out:

- my $intval=$Config{ivtype} || 'long';
- my $floatval=$Config{nvtype} || 'double';
- my $opcode=$Config{ivtype} || 'long';
-
- $intval=$args{intval} if defined $args{intval};
- $floatval=$args{floatval} if defined $args{floatval};
- $opcode=$args{opcode} if defined $args{opcode};
+ my $intval=$args{intval} || 'long';
+ my $floatval=$args{floatval} || 'double';
+ my $opcode=$args{opcode} || 'long';

Committed. All tests pass.

Incidentally, you might be interested in this:

brent@navi/~/parrot$ grep -r '[$@%]Config' config
config/auto/gcc.pl: if($Config{archname} !~ /86/) {
config/auto/gmp.pl: my $archname = $Config{archname};
config/auto/headers.pl: for (keys %Config) {
config/auto/headers.pl: Configure::Data->set($mapping{$_}||$_, $Config{$_});
config/auto/headers.pl: # properly reflected in %Config (i_fcntl
seems to be wrong on my machine,
config/auto/jit.pl: my $archname = $Config{archname};
config/auto/pack.pl: if (($] >= 5.006) && ($size == $longsize) &&
($size == $Config{longsize}) ) {
config/auto/pack.pl: elsif ($size == 8 || $Config{use64bitint} eq
'define') {
config/auto/signal.pl: foreach $name (split(' ', $Config{sig_name})) {
config/init/data.pl: optimize => $optimize ? $Config{optimize} : '',
config/init/data.pl: cc => $Config{cc},
config/init/data.pl: ccflags => $Config{ccflags},
config/init/data.pl: ccwarn => exists($Config{ccwarn}) ?
$Config{ccwarn} : '',
config/init/data.pl: cc_shared => $Config{cccdlflags}, # e.g. -fpic
for GNU cc.
config/init/data.pl: link => $Config{cc},
config/init/data.pl: linkflags => $Config{ldflags},
config/init/data.pl: ld => $Config{ld},
config/init/data.pl: ldflags => $Config{ldflags},
config/init/data.pl: libs => $Config{libs},
config/init/data.pl: exe => $Config{_exe}, #
executable files extension
config/init/data.pl: ld_shared => $Config{lddlflags},
config/init/data.pl: ar => $Config{ar},
config/init/data.pl: ranlib => $Config{ranlib},
config/init/data.pl: make => $Config{make},
config/init/data.pl: make_set_make => $Config{make_set_make},

--
Brent "Dax" Royal-Gordon <br...@brentdax.com>
Perl and Parrot hacker

Oceania has always been at war with Eastasia.

Leopold Toetsch

unread,
Jul 16, 2004, 7:14:00 AM7/16/04
to Brent 'Dax' Royal-Gordon, Perl 6 Internals
Brent 'Dax' Royal-Gordon wrote:
> Leopold Toetsch wrote:
>
>> On (AFAIK) all systems: opcode_type = intval_type = long. This size
>> has to match the pointer size. And floatval_type = double.
>
>
> Very small, as it turns out:

Great, thanks. The patch is smaller then my description ;)

leo

Timur Safin

unread,
Jul 16, 2004, 5:14:42 PM7/16/04
to Leopold Toetsch, perl6-i...@perl.org
----- Original Message -----
From: "Leopold Toetsch" <l...@toetsch.at>
To: "Perl 6 Internals" <perl6-i...@perl.org>
Sent: Friday, July 16, 2004 9:42 AM
Subject: Parrot config - a small perl task


> On (AFAIK) all systems: opcode_type = intval_type = long. This size has
> to match the pointer size. And floatval_type = double.

It was not exactly true till recent (the counter sample is OpenVMS, IIRC), and
is even more incorrect since Win64 goes to the field: both Itanium and Amd64
ports of Windows XP, or 2003 Server use 32-bit sizes for int and long, while
pointers are 64 bit there. So please be prepared...

>
> Thanks,
> leo
>
>
>

Regards,
Timur


Leopold Toetsch

unread,
Jul 16, 2004, 11:36:23 PM7/16/04
to Timur Safin, perl6-i...@perl.org

Well, yes. The "all systems" above should have been "all currently
implemented ...". The Win64 implementation is sick. Anyway we need
that pointer size matches opcode and intval size.

> Regards,
> Timur

leo

0 new messages