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 Parrot catches null Px register access

Newsgroups: perl.perl6.internals
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <mrjoltc...@mindspring.com>
Mailing-List: contact perl6-internals-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-intern...@perl.org
Delivered-To: perl6-intern...@perl.org
Message-ID: <5.1.1.6.2.20031027223024.030e2f28@pop.mindspring.com>
X-Sender: mrjoltc...@mindspring.com@pop.mindspring.com
X-Mailer: QUALCOMM Windows Eudora Version 5.1.1
Date: Mon, 27 Oct 2003 22:40:45 -0500
To: perl6-intern...@perl.org
Subject: [COMMIT] Parrot catches null Px register access
Cc: dan Sugalski <d...@sidhe.org>, leopold Toetsch <l...@toetsch.at>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
X-Spam-Check-By: la.mx.develooper.com
X-Spam-Status: No, hits=1.1 required=7.0 tests=CARRIAGE_RETURNS,SPAM_PHRASE_00_01 version=2.44
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: mrjoltc...@mindspring.com (Melvin Smith)
Lines: 28

Just in time for the "screamin' punkin" release....

I've patched in a quick and dirty implementation of the previous
discussion regarding Parrot segfaulting on access to a null register.
Of course, HLL compilers shouldn't generate code that results in
an uninitialized Px register, but we would like to do something more
elegant than just dump core.

You'll have to edit interpreter.h and set PARROT_CATCH_NULL to 1
to enable it.

The patch adds the Null PMC class, only instantiated once in
system memory. PMC register banks are set to PMCNULL now.
The null op returns PMCNULL as well. Also patched it into extend.c
so extension writers can get at it.

I didn't turn it on by default yet as we need to check over the code
to see where assumptions are being made about PMC pointers
just being NULL. However, all tests pass except the pmc create test
(you can't do a new .Null).

This is good enough to start, I think.
We should also integrate the null.pmc generation into pmc2c or pmc2c2.

-Melvin