Dan Sugalski:
# At 12:51 AM -0700 5/15/02, Brent Dax wrote:
# >-Parrot becomes Parrot_Interp
# >-Parrot_String is gone and the string_funcs.h functions are 
# no longer 
# >externally visible. -A few structures have been renamed.
# >-config.h has been rearranged so that INTVAL, etc. are now 
# aliases for
# >Parrot_Int, etc.
# >-A few things that were accidentally made external no longer are.
# 
# This isn't a problem with config.h. config.h should *never* be used 
# by anyone embedding Parrot, either directly or indirectly.

Why not?  Some parts of Parrot's embedding system have to be set up by
Configure.

# >At this point, I have a plea:  BRING ME THE HEAD OF THE 
# COMPTUED GOTO 
# >GUY!
# 
# Brent, that's inappropriate and uncalled for. What he's done 
# isn't incorrect.

OK, I was going for dramatic effect.  Sorry.

# >I first noticed the problems with computed-goto when I found the 
# >following line in test_main.c:
# >
# >     #ifdef HAVE_COMPUTED_GOTO
# >
# >See the problem?
# 
# Yes. test_main.c should never have to know about computed goto cores 
# or whatnot. The define's likely something generally passed on the 
# command line to all the parrot core bits,

True.  Still, the idea of a define like this not being fixed somewhere
scares me a bit.  If someone tries to send us a copy of their config.h
so we can debug a problem, we can't tell if they have cgoto enabled.

Actually, it should know that Parrot may support a computed-goto core
and the flag to enable it is X.  It shouldn't have to know if this
particular copy of Parrot is built with that capability.  (It probably
should be able to detect it, however, so that it can handle cases like
the one in test_main's -h handler.)

# test_main.c should only use "parrot/embed.h", which shouldn't include 
# any Parrot .h files

I'm including three:

-parrot/interpreter.h, which provides a forward definition of struct
Parrot_Interp and a full definition of enum Parrot_Interp_flag.
-parrot/warnings.h, which provides warning classes.
-parrot/config.h, which provides data like what a Parrot_Int (INTVAL) is
and what version of Parrot this is.

All three are specifically crafted to expose as little as possible.
(Well, maybe not config.h, but it doesn't expose anything that isn't
prefixed.  I should probably move most of the JIT stuff out of the
interface.  In fact, I'll do that right now.)

--Brent Dax <[EMAIL PROTECTED]>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)

blink:  Text blinks (alternates between visible and invisible).
Conforming user agents are not required to support this value.
    --The W3C CSS-2 Specification

Reply via email to