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
[CAGE]: Parrot::Pmc2c::PCCMETHOD constants should be autogenerated
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
Jerry Gay  
View profile  
 More options Apr 3 2007, 1:37 pm
Newsgroups: perl.perl6.internals
From: parrotbug-follo...@parrotcode.org (Jerry Gay)
Date: Tue, 03 Apr 2007 10:37:14 -0700
Local: Tues, Apr 3 2007 1:37 pm
Subject: [perl #42286] [CAGE]: Parrot::Pmc2c::PCCMETHOD constants should be autogenerated
# New Ticket Created by  Jerry Gay
# Please include the string:  [perl #42286]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42286 >

lib/Parrot/Pmc2c/PCCMETHOD.pm contains a number of constants, defined
for use in the package. these constants should be generated during the
configure process and included, following the DRY principle (don't
repeat yourself.)

~jerry

use constant REGNO_INT => 0;
use constant REGNO_NUM => 1;
use constant REGNO_STR => 2;
use constant REGNO_PMC => 3;

#/* 4 low bits are argument types */
use constant PARROT_ARG_INTVAL    => 0x000;
use constant PARROT_ARG_STRING    => 0x001;
use constant PARROT_ARG_PMC       => 0x002;
use constant PARROT_ARG_FLOATVAL  => 0x003;
use constant PARROT_ARG_TYPE_MASK => 0x00f;

#/* argument meaning and conversion bits */
use constant PARROT_ARG_CONSTANT => 0x010;

#/* bits a user has to define */
use constant PARROT_ARG_FLATTEN      => 0x020;                 # /*
.flatten_arg */
use constant PARROT_ARG_SLURPY_ARRAY => PARROT_ARG_FLATTEN;    # /*
i.e. foldup  */

use constant PARROT_ARG_OPTIONAL => 0x080;
use constant PARROT_ARG_OPT_FLAG => 0x100;                     # /*
prev optional was set */
use constant PARROT_ARG_NAME     => 0x200;                     # /*
this String is an arg name */


 
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.
Allison Randal via RT  
View profile  
 More options Aug 29 2007, 12:16 pm
Newsgroups: perl.perl6.internals
From: parrotbug-follo...@parrotcode.org (Allison Randal via RT)
Date: Wed, 29 Aug 2007 09:16:25 -0700
Local: Wed, Aug 29 2007 12:16 pm
Subject: [perl #42286] [CAGE]: Parrot::Pmc2c::PCCMETHOD constants should be autogenerated
On Tue Apr 03 10:37:13 2007, particle wrote:

> lib/Parrot/Pmc2c/PCCMETHOD.pm contains a number of constants, defined
> for use in the package. these constants should be generated during the
> configure process and included, following the DRY principle (don't
> repeat yourself.)

In r20917, I committed a patch from Lukas Mai at the YAPC::EU hackathon,
to solve this. It refactors config/gen/parrot_include.pm, to generate
not just the .pasm versions of the constants files, but also Perl versions.

I would like to see this refactored further, so it generates .pm files
in lib/Parrot/Constants, and so lib/Parrot/Pmc2c/PCCMETHOD.pm uses the
constants as standard modules with a standard import.

The patch is a huge improvement over the existing code in modularity and
maintainability.

Allison


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »