[svn:parrot] r36539 - in branches/vtable_morph_change: . config/auto/format config/gen/makefiles config/init/hints docs/book docs/dev docs/pdds docs/pdds/draft examples/pir include/parrot languages/PIR languages/befunge languages/cola languages/dotnet languages/ecmascript/t/sanity_pt languages/lua/t/test languages/pheme languages/pipp languages/pipp/docs languages/pipp/src/classes languages/pipp/src/common languages/pipp/src/pmc languages/pipp/t/embed languages/pipp/t/php languages/regex lib/Parrot lib/Parrot/Pmc2c ports/debian src src/dynpmc src/gc src/io src/ops src/pmc t/compilers/imcc/syn t/compilers/tge t/dynpmc t/pmc t/src t/tools tools/dev tools/install tools/util
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Tue Feb 10 15:54:09 UTC 2009
Author: whiteknight
Date: Tue Feb 10 15:54:03 2009
New Revision: 36539
URL: https://trac.parrot.org/parrot/changeset/36539
Log:
[vtable_morph_change] Update to trunk from r36538 to get past the IO buffering problem. Branch builds now
Added:
branches/vtable_morph_change/languages/cola/TODO
- copied unchanged from r36538, trunk/languages/cola/TODO
branches/vtable_morph_change/languages/regex/TODO
- copied unchanged from r36538, trunk/languages/regex/TODO
Modified:
branches/vtable_morph_change/ (props changed)
branches/vtable_morph_change/MANIFEST
branches/vtable_morph_change/config/auto/format/intval_maxmin_c.in (props changed)
branches/vtable_morph_change/config/gen/makefiles/dynoplibs_pl.in
branches/vtable_morph_change/config/gen/makefiles/dynpmc_pl.in
branches/vtable_morph_change/config/gen/makefiles/parrot_embed_pl.in
branches/vtable_morph_change/config/init/hints/mswin32.pm
branches/vtable_morph_change/docs/book/appX_patch_submission.pod (props changed)
branches/vtable_morph_change/docs/book/ch07_testing_and_debugging.pod (props changed)
branches/vtable_morph_change/docs/book/ch08_architecture.pod (props changed)
branches/vtable_morph_change/docs/book/ch09_pct.pod (props changed)
branches/vtable_morph_change/docs/book/ch10_hlls.pod (props changed)
branches/vtable_morph_change/docs/book/ch11_pmcs.pod (props changed)
branches/vtable_morph_change/docs/book/ch12_opcodes.pod (props changed)
branches/vtable_morph_change/docs/book/ch13_reference.pod (props changed)
branches/vtable_morph_change/docs/dev/c_functions.pod (props changed)
branches/vtable_morph_change/docs/pdds/draft/pdd01_overview.pod
branches/vtable_morph_change/docs/pdds/draft/pdd05_opfunc.pod
branches/vtable_morph_change/docs/pdds/draft/pdd06_pasm.pod
branches/vtable_morph_change/docs/pdds/draft/pdd08_keys.pod
branches/vtable_morph_change/docs/pdds/draft/pdd10_embedding.pod
branches/vtable_morph_change/docs/pdds/draft/pdd11_extending.pod
branches/vtable_morph_change/docs/pdds/draft/pdd14_numbers.pod
branches/vtable_morph_change/docs/pdds/draft/pdd16_native_call.pod
branches/vtable_morph_change/docs/pdds/draft/pdd29_compiler_tools.pod
branches/vtable_morph_change/docs/pdds/draft/pdd30_install.pod
branches/vtable_morph_change/docs/pdds/draft/pdd31_hll_interop.pod
branches/vtable_morph_change/docs/pdds/pdd00_pdd.pod
branches/vtable_morph_change/docs/pdds/pdd20_lexical_vars.pod
branches/vtable_morph_change/examples/pir/pirric.pir
branches/vtable_morph_change/include/parrot/gc_api.h (props changed)
branches/vtable_morph_change/include/parrot/gc_mark_sweep.h (props changed)
branches/vtable_morph_change/include/parrot/gc_pools.h (props changed)
branches/vtable_morph_change/include/parrot/pmc.h
branches/vtable_morph_change/languages/PIR/pir.pir (props changed)
branches/vtable_morph_change/languages/befunge/Configure.pl (props changed)
branches/vtable_morph_change/languages/dotnet/TODO
branches/vtable_morph_change/languages/ecmascript/t/sanity_pt/03-boolean.t (props changed)
branches/vtable_morph_change/languages/lua/t/test/bisect-output-win32.txt (props changed)
branches/vtable_morph_change/languages/pheme/TODO
branches/vtable_morph_change/languages/pipp/docs/internals.pod (props changed)
branches/vtable_morph_change/languages/pipp/pipp.pir (props changed)
branches/vtable_morph_change/languages/pipp/src/classes/Object.pir (props changed)
branches/vtable_morph_change/languages/pipp/src/common/php_filesystem.pir (props changed)
branches/vtable_morph_change/languages/pipp/src/pmc/pipp_hash.c (props changed)
branches/vtable_morph_change/languages/pipp/src/pmc/pipp_hash.h (props changed)
branches/vtable_morph_change/languages/pipp/t/embed/eval.t (props changed)
branches/vtable_morph_change/languages/pipp/t/php/filesystem.t (props changed)
branches/vtable_morph_change/lib/Parrot/Pmc2c/Attribute.pm
branches/vtable_morph_change/lib/Parrot/Pmc2c/PMCEmitter.pm
branches/vtable_morph_change/lib/Parrot/Test.pm
branches/vtable_morph_change/lib/Parrot/Vtable.pm
branches/vtable_morph_change/ports/debian/copyright
branches/vtable_morph_change/src/dynpmc/pair.pmc (props changed)
branches/vtable_morph_change/src/extend.c
branches/vtable_morph_change/src/gc/api.c (props changed)
branches/vtable_morph_change/src/gc/generational_ms.c (props changed)
branches/vtable_morph_change/src/gc/incremental_ms.c (props changed)
branches/vtable_morph_change/src/gc/mark_sweep.c (props changed)
branches/vtable_morph_change/src/gc/pools.c (props changed)
branches/vtable_morph_change/src/gc/system.c (props changed)
branches/vtable_morph_change/src/inter_call.c
branches/vtable_morph_change/src/inter_cb.c
branches/vtable_morph_change/src/io/buffer.c
branches/vtable_morph_change/src/ops/pmc.ops
branches/vtable_morph_change/src/pmc.c
branches/vtable_morph_change/src/pmc/addrregistry.pmc
branches/vtable_morph_change/src/pmc/exceptionhandler.pmc
branches/vtable_morph_change/src/pmc/pmcproxy.pmc
branches/vtable_morph_change/src/thread.c
branches/vtable_morph_change/t/compilers/imcc/syn/pcc.t
branches/vtable_morph_change/t/compilers/tge/NoneGrammar.tg (props changed)
branches/vtable_morph_change/t/dynpmc/pair.t (props changed)
branches/vtable_morph_change/t/pmc/exceptionhandler.t
branches/vtable_morph_change/t/src/compiler.t
branches/vtable_morph_change/t/tools/pmc2c.t
branches/vtable_morph_change/tools/dev/mk_gitignore.pl (props changed)
branches/vtable_morph_change/tools/install/smoke.pl
branches/vtable_morph_change/tools/util/perlcritic-cage.conf (props changed)
Modified: branches/vtable_morph_change/MANIFEST
==============================================================================
--- branches/vtable_morph_change/MANIFEST Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/MANIFEST Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Feb 9 06:46:28 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 10 03:30:40 2009 UT
#
# See tools/dev/install_files.pl for documentation on the
# format of this file.
@@ -1264,6 +1264,7 @@
languages/cola/MAINTAINER [cola]
languages/cola/README [cola]
languages/cola/System.cola [cola]
+languages/cola/TODO [cola]
languages/cola/cola.h [cola]
languages/cola/cola.l [cola]
languages/cola/cola.y [cola]
@@ -2181,6 +2182,7 @@
languages/regex/MAINTAINER [regex]
languages/regex/README [regex]
languages/regex/README.hacking [regex]
+languages/regex/TODO [regex]
languages/regex/config/makefiles/root.in [regex]
languages/regex/docs/regex.pod [regex]
languages/regex/lib/Parrot/Test/Regex.pm [regex]
Modified: branches/vtable_morph_change/config/gen/makefiles/dynoplibs_pl.in
==============================================================================
--- branches/vtable_morph_change/config/gen/makefiles/dynoplibs_pl.in Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/config/gen/makefiles/dynoplibs_pl.in Tue Feb 10 15:54:03 2009 (r36539)
@@ -35,13 +35,7 @@
#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
# Here comes some stuff for Win32.
-our $PATHQUOTE = q[];
-if ($^O eq 'MSWin32') {
- # Paths need quoting as they may contain spaces.
- $PATHQUOTE = q["];
- # absolute because we are building in src\dynoplibs
- $LIBPARROT = '@build_dir@/libparrot.lib'; # the importlib, not the static one
-}
+our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
# OPS2C Config
our $OPS2C = "$PERL -I $PATHQUOTE" .
Modified: branches/vtable_morph_change/config/gen/makefiles/dynpmc_pl.in
==============================================================================
--- branches/vtable_morph_change/config/gen/makefiles/dynpmc_pl.in Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/config/gen/makefiles/dynpmc_pl.in Tue Feb 10 15:54:03 2009 (r36539)
@@ -39,13 +39,7 @@
#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
# Here comes some stuff for Win32.
-our $PATHQUOTE = '';
-if ($^O eq 'MSWin32') {
- # Paths need quoting as they may contain spaces.
- $PATHQUOTE = '"';
- # absolute because we are building in src\dynoplibs
- $LIBPARROT = '@build_dir@/libparrot.lib'; # the importlib, not the static one
-}
+our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
# PMC2C Config
our $PMC2C = "$PERL $PATHQUOTE" . q[@build_dir@@slash at tools@slash at build@slash at pmc2c.pl] . $PATHQUOTE;
@@ -203,7 +197,6 @@
return system(@_) == 0;
}
-# TT #289: ordering of libs might be crucial
sub gather_groups_and_libs {
my @pmcs = @_;
Modified: branches/vtable_morph_change/config/gen/makefiles/parrot_embed_pl.in
==============================================================================
--- branches/vtable_morph_change/config/gen/makefiles/parrot_embed_pl.in Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/config/gen/makefiles/parrot_embed_pl.in Tue Feb 10 15:54:03 2009 (r36539)
@@ -36,7 +36,7 @@
'PREREQ_PM' => { 'ExtUtils::CBuilder' => 0 },
#IF(win32): 'LIBS' => [ $config{C_LIBS} ],
#ELSE: 'LIBS' => [ $config{ALL_PARROT_LIBS} ],
-#IF(win32): 'OBJECT' => "@libparrot_ldflags@ Embed at o@",
+#IF(win32): 'OBJECT' => q|@libparrot_ldflags@ Embed at o@|,
'INC' => "-I$config{INCLUDE}",
'PM' => { map { $_ => "blib/$_" } <lib/Parrot/*pm> },
'clean' => { FILES => '*.xs t/greet.pbc' },
Modified: branches/vtable_morph_change/config/init/hints/mswin32.pm
==============================================================================
--- branches/vtable_morph_change/config/init/hints/mswin32.pm Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/config/init/hints/mswin32.pm Tue Feb 10 15:54:03 2009 (r36539)
@@ -103,7 +103,7 @@
# If we are building shared, need to include dynamic libparrot.lib, otherwise
# the static libparrot.lib.
- $conf->data->set( libparrot_ldflags => 'libparrot.lib' );
+ $conf->data->set( libparrot_ldflags => "\"$build_dir\\libparrot.lib\"" );
# 'link' needs to be link.exe, not cl.exe.
# This makes 'link' and 'ld' the same.
@@ -239,6 +239,7 @@
has_dynamic_linking => 1,
ld_load_flags => '-shared ',
ld_share_flags => '-shared ',
+ libparrot_ldflags => "\"$build_dir\\libparrot.dll\"",
ncilib_link_extra => 'src/libnci_test.def',
sym_export => '__declspec(dllexport)',
sym_import => '__declspec(dllimport)',
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd01_overview.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd01_overview.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd01_overview.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,19 +1,17 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 A high-level overview of Parrot
-docs/pdds/pdd01_overview.pod - A high-level overview of Parrot
-
-=head1 ABSTRACT
+=head2 Abstract
A high-level overview of the Parrot virtual machine.
-=head1 VERSION
+=head2 Version
$Revision$
-=head1 DESCRIPTION
+=head2 Description
Parrot is a virtual machine for dynamic languages like Python, PHP, Ruby, and
Perl. A dynamic language is one that allows things like extension of the code
@@ -25,9 +23,9 @@
dynamic features like higher-order functions, closures, continuations, and
coroutines.
-=head1 IMPLEMENTATION
+=head2 Implementation
-=head2 Parser
+=head3 Parser
While individual high-level languages may implement their own parser,
most will use Parrot's parser grammar engine (PGE). The parser grammar
@@ -45,18 +43,18 @@
bytecode. Some compilers will also insert optimization stages into the
compilation process between the common transformation stages.
-=head2 IMCC
+=head3 IMCC
The intermediate code compiler (IMCC) is the main F<parrot> executable,
and encapsulates several core low-level components.
-=head3 PASM & PIR parser
+=head4 PASM & PIR parser
This Bison and Flex based parser/lexer handles Parrot's assembly
language, PASM, and the slightly higher-level language, PIR (Parrot
Intermediate Representation).
-=head3 Bytecode compiler
+=head4 Bytecode compiler
The bytecode compiler module takes a syntax tree from the parser and emits an
unoptimized stream of bytecode. This code is suitable for passing straight to
@@ -65,13 +63,13 @@
Note that currently, the only way to generate bytecode is by first
generating PASM or PIR.
-=head3 Optimizer
+=head4 Optimizer
The optimizer module takes the bytecode stream from the compiler and
optionally the syntax tree the bytecode was generated from, and optimizes the
bytecode.
-=head3 Interpreter
+=head4 Interpreter
The interpreter module takes the bytecode stream from either the optimizer or
the bytecode compiler and executes it. There must always be at least one
@@ -84,7 +82,7 @@
interpreter modules would take the bytecode stream and spit out Java bytecode
instead of interpreting it.
-=head3 Standalone pieces
+=head4 Standalone pieces
Each piece of IMCC can, with enough support hidden away (in the form of an
interpreter for the parsing module, for example), stand on its own. This means
@@ -96,12 +94,12 @@
bytecode, far more than you might want to devote to optimizing
one-liners or code that'll run only once or twice.
-=head2 Subsystems
+=head3 Subsystems
The following subsystems are each responsible for a key component of
Parrot's core functionality.
-=head3 I/O subsystem
+=head4 I/O subsystem
The I/O subsystem provides source- and platform-independent synchronous
and asynchronous I/O to Parrot. How this maps to the OS's underlying I/O
@@ -112,7 +110,7 @@
input stream if necessary, to manipulate the data before it is presented to a
program.
-=head3 Regular expression engine
+=head4 Regular expression engine
The parser grammar engine (PGE) is also Parrot's regular expression
engine. The job of the regular expression engine is to compile regular
@@ -122,14 +120,14 @@
The regular expression engine is available to any language running on
Parrot.
-=head3 Data transformation engine
+=head4 Data transformation engine
The tree grammar engine (TGE) is also a general-purpose data
transformation tool (somewhat similar to XSLT).
-=head2 API levels
+=head3 API Levels
-=head3 Embedding
+=head4 Embedding
The embedding API is the set of calls exported to an embedding application.
This is a small, simple set of calls, requiring minimum effort to use.
@@ -140,7 +138,7 @@
intellectual effort. Generally it should take less than thirty minutes for a
simple interface, though more complete integration will take longer.
-=head3 Extensions
+=head4 Extensions
The extension API is the set of calls exported to Parrot extensions. They
provide access to most of the things an extension needs to do, while hiding
@@ -148,14 +146,14 @@
scalars are stored without having to rewrite, or even recompile, an
extension).
-=head3 Guts
+=head4 Guts
The guts-level APIs are the routines used within a component. These aren't
guaranteed to be stable, and shouldn't be used outside a component. (For
example, an extension to the interpreter shouldn't call any of the parser's
internal routines).
-=head2 Target Platforms
+=head3 Target Platforms
The ultimate goal of Parrot is portability to more-or-less the same
platforms as Perl 5, including AIX, BeOS, BSD/OS, Cygwin, Darwin,
@@ -172,9 +170,9 @@
actively seek porters for as many other platforms as possible.
-=head1 LANGUAGE NOTES
+=head2 Language Notes
-=head2 Parrot for small platforms
+=head3 Parrot for small platforms
One goal of the Parrot project, though not a requirement of the 1.0
release, is to run on small devices such as the Palm. For small
@@ -186,13 +184,13 @@
loading of precompiled modules via do, use, or require may be
supported).
-=head2 Bytecode compilation
+=head3 Bytecode compilation
One straightforward use of the Parrot system is to precompile a program into
bytecode and save it for later use. Essentially, we would compile a program as
normal, but then simply freeze the bytecode to disk for later loading.
-=head2 Your HLL in, Java, CLI, or whatever out
+=head3 Your HLL in, Java, CLI, or whatever out
The previous section assumes that we will be emitting Parrot bytecode.
However, there are other possibilities: we could translate the bytecode
@@ -200,7 +198,7 @@
principle, Parrot could also act as a front end to other modular
compilers such as gcc or HP's GEM compiler system.
-=head1 REFERENCES
+=head2 References
To come.
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd05_opfunc.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd05_opfunc.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd05_opfunc.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,11 +1,9 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Opcode Function specs
-docs/pdds/pdd05_opfunc.pod - Opcode Function specs
-
-=head1 ABSTRACT
+=head2 Abstract
This PDD specifies how the opcode functions should behave and how they are
called by the Parrot interpreter.
@@ -15,7 +13,7 @@
{{ NOTE: standardize on underscores or no underscores? }}
-=head1 DESCRIPTION
+=head2 Description
The opcode functions are the workhorse of the Parrot engine. They control
program flow and do most of the work in a program. (The rest being done by the
@@ -53,7 +51,7 @@
will likely run slower (as the interpreter would need to set up the registers
and other stuff that would normally get stripped away for speed)
-=head2 The wrapping function
+=head3 The wrapping function
This is the function that the interpreter actually executes. It has all the
intimate knowledge of its parameters embedded in it, and is responsible for
@@ -63,14 +61,14 @@
the programmer doesn't have to create it. If, for some reason, you do need or
want to write it (for example if you have no inner function) that's fine.
-=head2 The inner function
+=head3 The inner function
The inner function is the code that actually does the work. This is generally
a chunk of C code, though the interpreter will be able to call perl code soon.
-=head1 IMPLEMENTATION
+=head2 Implementation
-=head2 Prototype declaration of inner function
+=head3 Prototype declaration of inner function
RETURN function(INPUT[, INPUT[, INPUT...]])
@@ -161,7 +159,7 @@
is a simple opcode function that corresponds to the C<addI> opcode.
-=head1 TODO
+=head2 TODO
=over 4
@@ -169,19 +167,19 @@
=back
-=head1 REFERENCES
+=head2 References
Oploop PDD, PDD 4 (Internal types)
-=head1 FOOTNOTES
+=head2 Footnotes
None.
-=head1 VERSION
+=head2 Version
1.0
-=head2 CURRENT
+=head3 Current
Maintainer: Dan Sugalski <dan at sidhe.org>
Class: Internals
@@ -192,11 +190,11 @@
PDD Format: 1
Language: English
-=head2 HISTORY
+=head3 History
None. First version
-=head1 CHANGES
+=head2 Changes
None. First version
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd06_pasm.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd06_pasm.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd06_pasm.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,15 +1,13 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Parrot Assembly Language
-docs/pdds/pdd06_pasm.pod - Parrot Assembly Language
-
-=head1 ABSTRACT
+=head2 Abstract
The format of Parrot's bytecode assembly language.
-=head1 DESCRIPTION
+=head2 Description
Parrot's bytecode can be thought of as a form of machine language for a
virtual super CISC machine. It makes sense, then, to define an assembly
@@ -20,7 +18,7 @@
useful as a specification of the format of PASM than as a comprehensive
listing of all opcodes. }}
-=head1 QUESTIONS
+=head2 Questions
=over 4
@@ -59,7 +57,7 @@
=back
-=head1 IMPLEMENTATION
+=head2 Implementation
Parrot opcodes take the format of:
@@ -84,7 +82,7 @@
All registers have a type prefix of P, S, I, or N, for PMC, string, integer,
and number respectively.
-=head1 Assembly Syntax
+=head2 Assembly Syntax
All assembly opcodes contain only ASCII lowercase letters, digits, and the
underscore.
@@ -154,7 +152,7 @@
-=head1 OPCODE LIST
+=head2 Opcode List
In the following list, there may be multiple (but unlisted) versions of an
opcode. If an opcode takes a register that might be keyed, the keyed version
@@ -182,7 +180,7 @@
either a register or constant of the appropriate type (PMC, string, integer,
or number)
-=head2 Control flow
+=head3 Control flow
The control flow opcodes check conditions and manage program flow.
@@ -221,7 +219,7 @@
=back
-=head2 Data manipulation
+=head3 Data manipulation
These ops handle manipulating the data in registers
@@ -317,7 +315,7 @@
=back
-=head2 Transcendental operations
+=head3 Transcendental operations
These opcodes handle the transcendental math functions. The destination
register here must always be either a numeric or a PMC register.
@@ -402,7 +400,7 @@
=back
-=head2 Register and stack ops
+=head3 Register and stack ops
These opcodes deal with registers and stacks
@@ -458,7 +456,7 @@
=back
-=head2 Names, pads, and globals
+=head3 Names, pads, and globals
These operations are responsible for finding names in lexical or global
scopes, as well as storing data into those slots. A static scope is captured
@@ -509,7 +507,7 @@
=back
-=head2 Exceptions
+=head3 Exceptions
These opcodes deal with exception handling at the lowest level. Exception
handlers are dynamically scoped, and any exception handler set in a scope will
@@ -538,7 +536,7 @@
=back
-=head2 Object things
+=head3 Object things
These opcodes deal with PMCs as objects, rather than as opaque data items.
@@ -565,7 +563,7 @@
=back
-=head2 Module handling
+=head3 Module handling
These opcodes deal with loading in bytecode or executable code libraries, and
fetching info about those libraries. This is all dealing with precompiled
@@ -600,7 +598,7 @@
=back
-=head2 I/O operations
+=head3 I/O operations
Reads and writes read and write records, for some value of record.
@@ -653,7 +651,7 @@
=back
-=head2 Threading ops
+=head3 Threading ops
=over 4
@@ -671,7 +669,7 @@
=back
-=head2 Interpreter ops
+=head3 Interpreter ops
=over 4
@@ -743,7 +741,7 @@
=back
-=head2 Garbage collection
+=head3 Garbage collection
=over 4
@@ -767,7 +765,7 @@
=back
-=head2 Key operations
+=head3 Key operations
Keys are used to get access to individual elements of an aggregate variable.
This is done to allow for opaque, packed, and multidimensional aggregate
@@ -825,7 +823,7 @@
=back
-=head2 Properties
+=head3 Properties
Properties are a sort of runtime note attached to a PMC. Any PMC can have
properties on it. Properties live in a flat namespace, and they are not in any
@@ -855,7 +853,7 @@
=back
-=head2 Symbolic support for HLLs
+=head3 Symbolic support for HLLs
=over 4
@@ -885,7 +883,7 @@
=back
-=head2 Foreign library access
+=head3 Foreign library access
These are the ops we use to load in and interface to non-parrot libraries.
@@ -987,7 +985,7 @@
=back
-=head2 Runtime compilation
+=head3 Runtime compilation
These opcodes deal with runtime creation of bytecode and compilation of source
code.
@@ -1023,19 +1021,19 @@
=back
-=head1 ATTACHMENTS
+=head2 Attachments
None.
-=head1 REFERENCES
+=head2 References
None.
-=head1 VERSION
+=head2 Version
1.9
-=head2 CURRENT
+=head3 Current
Maintainer: Dan Sugalski
Class: Internals
@@ -1046,7 +1044,7 @@
PDD Format: 1
Language: English
-=head2 HISTORY
+=head3 History
=over 4
@@ -1092,7 +1090,7 @@
=back
-=head1 CHANGES
+=head2 Changes
=over 4
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd08_keys.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd08_keys.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd08_keys.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,16 +1,14 @@
-# Copyright (C) 2001-2004, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Indexing Aggregate PMCs
-docs/pdds/pdd08_keys.pod - Indexing Aggregate PMCs
-
-=head1 ABSTRACT
+=head2 Abstract
This PDD aims to clear up the confusion regarding the implementation of keyed
access to PMCs in Parrot.
-=head1 DESCRIPTION
+=head2 Description
First, let's define some terminology. An C<aggregate PMC> is one which stores
or references other values as elements. The aggregate PMC allows indexed
@@ -38,9 +36,9 @@
Now, how does this all get implemented?
-=head1 IMPLEMENTATION
+=head2 Implementation
-=head2 The key structure
+=head3 The key structure
The key structure must bundle multiple keys. This is to allow indexing into
multidimensional aggregate PMCs. These keys may be specified as integer,
@@ -94,7 +92,7 @@
These definitions, along with declarations of support routines used to
manipulate keys, can be found in F<include/parrot/key.h>
-=head2 Aggregate and non-aggregate PMCs
+=head3 Aggregate and non-aggregate PMCs
We've already said that what separates the aggregate PMCs from the
non-aggregates is their implementation of the C<_keyed> vtable methods. So it
@@ -111,7 +109,7 @@
=back
-=head2 C<_keyed> vtable methods
+=head3 C<_keyed> vtable methods
So what of these magical C<_keyed> vtable methods? They are generated when you
add the C<keyed> tag to the appropriate entry in F<src/vtable.tbl>. They are
@@ -173,7 +171,7 @@
indexing respectively. However, this didn't give us the flexibility and
scalability that key structures give us.
-=head2 Input to the assembler
+=head3 Input to the assembler
There are several different valid specifications of an aggregate key to the
assembler. These are:
@@ -200,7 +198,7 @@
represented by a single PMC register that is assumed to contain a PMC of the
Key class.
-=head2 What the assembler did next
+=head3 What the assembler did next
When the assembler sees an aggregate key, it "detaches" the key to form a
separate argument. It then decides on the type of key. For integer keys (both
@@ -230,7 +228,7 @@
produces an op named C<set_p_ki>.
-=head2 Bytecode representation
+=head3 Bytecode representation
The bytecode representation of these keys are as follows: constant keys are
treated just like another constant, and are an index into the packfile's
@@ -255,9 +253,9 @@
The type values shown above are actually the C<PARROT_ARG_*> values taken from
F<include/parrot/op.h>.
-=head1 VERSION
+=head2 Version
-=head2 CURRENT
+=head3 Current
Maintainer: Simon Cozens <simon at netthink.co.uk>
Class: Internals
@@ -268,7 +266,7 @@
PDD Format: 1
Language: English
-=head2 HISTORY
+=head3 History
=over 4
@@ -290,7 +288,7 @@
=back
-=head1 REFERENCES
+=head2 References
To come.
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd10_embedding.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd10_embedding.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd10_embedding.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,11 +1,9 @@
-# Copyright (c) 2001-2006, The Perl Foundation.
+# Copyright (c) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Parrot's Embedding and Extending Interface
-docs/pdds/embedding.pod - Parrot's Embedding and Extending Interface
-
-=head1 ABSTRACT
+=head2 Abstract
What we believe people will do when embedding and extending Parrot, why they
do it, and how.
@@ -13,11 +11,11 @@
{{ NOTE: some of this will later move into pdds 11 & 12, but for now
just want to get the stub checked in. }}
-=head1 VERSION
+=head2 Version
$Revision$
-=head1 DESCRIPTION
+=head2 Description
Why embed:
@@ -135,7 +133,7 @@
=back
-=head1 DEFINITIONS
+=head2 Definitions
Embedding - using libparrot from within another program, likely with a
C/NCI/FFI interface
@@ -145,7 +143,7 @@
In practice, there is little difference between the two; mostly in terms of
who has control. The necessary interfaces should stay the same.
-=head1 IMPLEMENTATION
+=head2 Implementation
Implementation details.
@@ -168,7 +166,7 @@
=back
-=head2 Working with Interpreters
+=head3 Working with Interpreters
It is the external code's duty to create, manage, and destroy interpreters.
@@ -188,7 +186,7 @@
I<Note: It is not clear what happens if this interpreter has active children.>
-=head2 Working with Source Code and PBC Files
+=head3 Working with Source Code and PBC Files
Perhaps the most common case for working with code is loading it from an
external file. This may often be PBC, but it must also be possible to load
@@ -228,33 +226,33 @@
I<Note: this declaration should move from F<interpreter.h> to F<embed.h>.>
-=head2 Working with PMCs
+=head3 Working with PMCs
TBD.
-=head2 Calling Functions
+=head3 Calling Functions
TBD.
-=head2 Calling Opcodes
+=head3 Calling Opcodes
TBD.
-=head1 LANGUAGE NOTES
+=head2 Language Notes
It should be possible to register a compiler for an HLL with an interpreter
such that it is possible to load source code written in that language or pass
source code to an interpreter successfully.
-=head1 ATTACHMENTS
+=head2 Attachments
Any associated documents.
-=head1 FOOTNOTES
+=head2 Footnotes
List of footnotes to the text.
-=head1 REFERENCES
+=head2 References
List of references.
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd11_extending.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd11_extending.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd11_extending.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,17 +1,15 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 The Parrot Extension System
-docs/pdds/pdd11_extending.pod - The Parrot Extension System
-
-=head1 ABSTRACT
+=head2 Abstract
The extension API for Parrot is a simple, somewhat abstract, interface to
Parrot for code written in C or other compiled languages. It provides about
the same level of access to Parrot that bytecode programs have.
-=head1 DESCRIPTION
+=head2 Description
The API presents to C programs roughly the same interface presented to
bytecode programs--that is, a C extension can see everything that a bytecode
@@ -32,9 +30,9 @@
functions may be added, and those described below may change or be removed.
You have been warned...
-=head1 IMPLEMENTATION
+=head2 Implementation
-=head2 API - Group 1: Internals-unaware functions
+=head3 API - Group 1: Internals-unaware functions
These functions are the ones that are largely unaware of the structure and
architecture of Parrot. They deal mainly in data as abstract entities, and
@@ -42,7 +40,7 @@
calls. This is sufficient for many extensions which act as black box
processing units and in turn treat Parrot itself as a black box.
-=head3 PMC access functions
+=head4 PMC access functions
The following functions are for storing and retrieving data inside PMCs. Note
that use of the _keyed functions with non-aggregate PMCs will generally just
@@ -202,7 +200,7 @@
=back
-=head3 Creation and destruction
+=head4 Creation and destruction
Functions used to create and destroy PMCs, Parrot_Strings, etc.
@@ -271,7 +269,7 @@
=back
-=head3 Subroutine and method calls
+=head4 Subroutine and method calls
Functions to call Parrot subroutines and methods
@@ -293,7 +291,7 @@
=back
-=head2 API - Group 2: Internals aware
+=head3 API - Group 2: Internals aware
The internals-aware functions are for those extensions that need to query or
alter the state of Parrot's internals in some way.
@@ -327,21 +325,21 @@
=back
-=head1 ATTACHMENTS
+=head2 Attachments
None.
-=head1 FOOTNOTES
+=head2 Footnotes
None.
-=head1 REFERENCES
+=head2 References
F<docs/glossary.pod>
-=head1 VERSION
+=head2 Version
-=head2 CURRENT
+=head3 Current
Maintainer:
Class: Internals
@@ -352,7 +350,7 @@
PDD Format: 1
Language: English
-=head2 HISTORY
+=head3 History
=over 4
@@ -362,7 +360,7 @@
=back
-=head1 CHANGES
+=head2 Changes
=over 4
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd14_numbers.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd14_numbers.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd14_numbers.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,24 +1,22 @@
-# Copyright (C) 2001-2008, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Parrot Numbers
-docs/pdds/pdd14_numbers.pod - Parrot Numbers
-
-=head1 ABSTRACT
+=head2 Abstract
This PDD describes Parrot's numeric data types.
-=head1 VERSION
+=head2 Version
$Revision$
-=head1 DESCRIPTION
+=head2 Description
This PDD details the basic numeric datatypes that the Parrot core knows how to
deal with, including the core numeric PMCs.
-=head2 Integer data types
+=head3 Integer data types
Parrot provides a native integer data type, generally known as an "Int". The
size of the integer is chosen at Parrot configuration time, the same size as
@@ -34,7 +32,7 @@
integer may be autoboxed as an C<Integer> PMC, or as an HLL type mapped to
C<Integer>.
-=head2 Floating-point data types
+=head3 Floating-point data types
Parrot provides a native floating-point data type, generally known as a "Num".
The size of the float is chosen at Parrot configuration time, the same size as
@@ -49,7 +47,7 @@
method call, a native float may be autoboxed as a C<Float> PMC, or as an HLL
type mapped to C<Float>.
-=head2 Integer PMC
+=head3 Integer PMC
The C<Integer> PMC is a high-level integer type, providing the features of a
integer data type appropriate for use in a high-level language. Some languages
@@ -59,7 +57,7 @@
The C<Integer> PMC has a single attribute, the integer value.
-=head3 Integer Vtable Functions
+=head4 Integer Vtable Functions
=over 4
@@ -162,7 +160,7 @@
=back
-=head3 Integer Multis
+=head4 Integer Multis
Many of the math vtable functions are defined as multiple dispatch functions.
@@ -212,7 +210,7 @@
=back
-=head3 Integer Methods
+=head4 Integer Methods
=over 4
@@ -223,15 +221,15 @@
=back
-=head2 Float PMC
+=head3 Float PMC
-=head2 BigInt PMC
+=head3 BigInt PMC
The big number library provides Parrot with both a collection of (nearly)
infinite precision numeric types and an implementation of an extended decimal
arithmetic (EDA).
-=head2 Why decimal arithmetic?
+=head3 Why decimal arithmetic?
There are benefits in using the big number library to provide both values of
effectively unlimited precision and a defined arithmetic, complete with
@@ -243,7 +241,7 @@
There is a trade-off in both space and speed, but given the nature of dynamic
languages, this should not present too great a burden.
-=head2 Numeric types provided
+=head3 Numeric types provided
The bignumber library provides the following data types to Parrot:
@@ -286,7 +284,7 @@
functions. The objects will be managed by Parrot's garbage collection in a
similar manner to strings.
-=head2 Special Values
+=head3 Special Values
Additionally the library provides special values which represent the result of
otherwise undefined operations (division by zero, for instance). Positive and
@@ -296,7 +294,7 @@
argument is a signalling C<NaN>, an exception will also be raised. See the
EDA for full details.
-=head2 Context
+=head3 Context
All operations occur within a defined context. This tells the operations how
they should treat their arguments, what sort of rounding to perform, and what
@@ -348,7 +346,7 @@
operation. This makes it easy to upgrade from one numeric form to another and
also allows for considerable code-reuse within the library.
-=head2 Exception Classes
+=head3 Exception Classes
The following exception classes are available:
@@ -388,7 +386,7 @@
=back
-=head2 Rounding
+=head3 Rounding
The rounding part of the context defines the rounding algorithm to used. The
following contexts are available (examples assume a precision of 5):
@@ -439,7 +437,7 @@
=back
-=head2 Operations
+=head3 Operations
The library provides the following operations. They function exactly as those
described in the Standard Decimal Arithmetic (SDA), with some extension to
@@ -492,7 +490,7 @@
=back
-=head2 Conversion to and from strings
+=head3 Conversion to and from strings
A one to one conversion between the abstract representation above and a string
is provided by the library, and acts as defined by the standard decimal
@@ -504,13 +502,13 @@
be provided, although in a separate file to the rest of the library. (They
will share a common private header file).
-=head1 IMPLEMENTATION
+=head2 Implementation
Functions are provided which implement the arithmetic, conversion, creation
and destruction of big numbers by dealing with otherwise opaque big number
objects.
-=head2 Big number representation
+=head3 Big number representation
A big number is represented by the following structure, capable of being
allocated, tracked, and destroyed by the Parrot garbage collection system.
@@ -533,7 +531,7 @@
field, NaN another flag field, and sNaN a third. In general the flags should
not be examined directly, even within the module.
-=head2 Context
+=head3 Context
typedef struct {
INTVAL precision; /* number of digs to retain */
@@ -553,7 +551,7 @@
and fixed-fraction number are provided by creating a context with an
appropriate precision whenever a call into the library is made.
-=head2 Exceptional Conditions
+=head3 Exceptional Conditions
When the module raises an exceptional condition, control passes to
C<BN_nonfatal()>. this examines the error which has occurred and the current
@@ -564,23 +562,23 @@
The possible exceptions are detailed in the extended decimal arithmetic.
-=head1 Tests
+=head2 Tests
The Standard Decimal Arithmetic provides a collection of tests for both its
base and extended behavior.
-=head1 TODO
+=head2 TODO
Fill in the remaining functions from the EDA, verify that the test suite still
passes, integrate the library into the rest of Parrot, provide PMC types and
suitable opcodes. Conversion to and from Parrot strings, conversion to and
from floating point types, sprintf output of bignumbers.
-=head1 ATTACHMENTS
+=head2 Attachments
-=head1 FOOTNOTES
+=head2 Footnotes
-=head1 REFERENCES
+=head2 References
IBM's Standard Decimal Arithmetic, with tests
(L<http://speleotrove.com/decimal/>)
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd16_native_call.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd16_native_call.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd16_native_call.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,16 +1,14 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 NCI conventions and definitions
-docs/pdds/pdd16_native_call.pod - NCI conventions and definitions
-
-=head1 ABSTRACT
+=head2 Abstract
This PDD describes the native call interface, and the function signatures used
to describe those functions.
-=head1 DESCRIPTION
+=head2 Description
The NCI is designed to allow Parrot to interface to I<most> of the functions
in a C library without having to write any C code for that interface. It
@@ -34,9 +32,9 @@
signature) the signature must be passed in when the linkage between the C
function and parrot is made.
-=head1 IMPLEMENTATION
+=head2 Implementation
-=head2 Function signatures
+=head3 Function signatures
The following list are the valid letters in the function signatures for
Parrot's NCI. Note that only letters and numbers are valid, and each letter
@@ -128,7 +126,7 @@
Note that not all types are valid as return types.
-=head2 Example NCI call
+=head3 Example NCI call
This section describes the simplest example for NCI possible. To every NCI
invocation, there are two parts: the native function to be invoked, and the
@@ -169,7 +167,7 @@
.end
-=head2 Callbacks
+=head3 Callbacks
Some libraries, particularly ones implementing more complex functionality such
as databases or GUIs, want callbacks, that is ways to call a function under
@@ -250,7 +248,7 @@
interpreter pointer, creating the wrapping PMCs, stuffing data various places,
and generally dealing with the bookkeeping.
-=head2 Example Callback
+=head3 Example Callback
This section contains an example to register a callback function and have
it call back into Parrot.
@@ -312,17 +310,17 @@
The file containing this C code should be compiled as a shared library
(specifying the C<include> directory so C<<parrot/parrot.h>> can be found.)
-=head1 REFERENCES
+=head2 References
L<pdd06_pasm.pod>
-=head1 SEE ALSO
+=head2 See Also
L<t/pmc/nci.t>, L<src/nci_test.c>
-=head1 VERSION
+=head2 Version
-=head2 CURRENT
+=head3 Current
Maintainer: Dan Sugalski
Class: Internals
@@ -333,7 +331,7 @@
PDD Format: 1
Language: English
-=head2 HISTORY
+=head3 History
=over 4
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd29_compiler_tools.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd29_compiler_tools.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd29_compiler_tools.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,35 +1,33 @@
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Parrot Compiler Tools
-docs/pdds/draft/pdd29_compiler_tools.pod - Parrot Compiler Tools
-
-=head1 VERSION
+=head2 Version
$Revision$
-=head1 MAINTAINER
+=head2 Maintainer
Will "Coke" Coleda
Klaas-Jan Stol
-=head1 DEFINITIONS
+=head2 Definitions
-=head2 Compiler
+=head3 Compiler
In this document, when we speak of a I<compiler>, we mean
PCT-based compilers.
-=head2 HLL
+=head3 HLL
A High-Level Language. Examples are: Perl, Ruby, Python, Lua, Tcl, etc.
-=head1 ABSTRACT
+=head2 Abstract
This PDD specifies the Parrot Compiler Tools (PCT).
-=head1 SYNOPSIS
+=head2 Synopsis
Creating a PCT-based compiler can be done as follows:
@@ -60,7 +58,7 @@
term. In a sense, this script can also be considered part of the parrot
compiler "tools", as it is used to create a compiler. }}
-=head2 Parser Synopsis
+=head3 Parser Synopsis
grammar Foo is PCT::Grammar;
@@ -85,7 +83,7 @@
| <number> {*} #= number
}
-=head2 Actions Synopsis
+=head3 Actions Synopsis
{{ Is this a good idea? }}
@@ -114,7 +112,7 @@
make $( $/{$key} );
}
-=head2 Running the compiler
+=head3 Running the compiler
Running the compiler is then done as follows:
@@ -123,7 +121,7 @@
{{ other options? Maybe --target=pbc in the future, once PBC can be
generated? }}
-=head1 DESCRIPTION
+=head2 Description
The Parrot Compiler Tools are specially designed to easily create a
compiler targeting the Parrot Virtual Machine. The tools themselves
@@ -146,7 +144,7 @@
list these as =items }}
-=head1 IMPLEMENTATION
+=head2 Implementation
The PCT is made up of the following libraries and programs:
@@ -169,7 +167,7 @@
compilers. NQP is a subset of the Perl 6 language, and is a
high-level language as an alternative for PIR.
-=head2 Compilation phases
+=head3 Compilation phases
A PCT-based compiler has by default four compilation phases, or
I<transformations>. Phases can be removed and added through the API of
@@ -195,7 +193,7 @@
=back
-=head3 Source to Parse Tree
+=head4 Source to Parse Tree
The first stage of a PCT-based compiler is done by the C<parser>. The
parser is defined as a set of Perl 6 Rules, which is processed by the
@@ -207,7 +205,7 @@
During the first stage, the source (input string) is parsed, resulting
in a C<parse tree>.
-=head3 Parse tree to PAST
+=head4 Parse tree to PAST
The second stage converts the parse tree into a Parrot Abstract Syntax Tree
(PAST). PAST is a data structure consisting of PAST nodes, each of which
@@ -222,7 +220,7 @@
and in the future maybe other languages.
}}
-=head3 PAST to POST
+=head4 PAST to POST
The third transformation converts the PAST into a Parrot Opcode Syntax Tree
(POST). PAST nodes represent HLL constructs, which are transformed into a
@@ -230,14 +228,14 @@
a single instruction, label, or a subroutine. While a PAST is very close to
a HLL program, a POST is much closer to PIR code.
-=head3 POST to PIR
+=head4 POST to PIR
The last transformation generates PIR code from the POST.
The generated PIR is then fed into the Parrot executable, and processed
into Parrot Byte Code (PBC) by the PIR compiler.
-=head2 Parrot Grammar Engine
+=head3 Parrot Grammar Engine
The Parrot Grammar Engine (PGE) is a component that I<executes> regular
expressions. Besides I<classic> regular expressions, it also understands
@@ -246,33 +244,33 @@
The I<start> symbol in a grammar is named C<TOP>; this is the top-level
rule that is executed when the parser is invoked.
-=head3 Operator precedence parsing
+=head4 Operator precedence parsing
{{ insert stuff about using an operator prec. table here }}
-=head2 Parrot Abstract Syntax Tree
+=head3 Parrot Abstract Syntax Tree
The PCT includes a set of PAST classes. PAST classes represent common language
constructs, such as a C<while statement>.
These are described extensively in L<docs/pdds/pdd26_ast.pod>.
-=head2 Parrot Opcode Syntax Tree
+=head3 Parrot Opcode Syntax Tree
-=head3 POST::Node
+=head4 POST::Node
POST::Node is the base class for all other POST classes.
-=head3 POST::Op
+=head4 POST::Op
-=head3 POST::Ops
+=head4 POST::Ops
-=head3 POST::Label
+=head4 POST::Label
-=head3 POST::Sub
+=head4 POST::Sub
-=head2 PCT::Grammar
+=head3 PCT::Grammar
The class C<PCT::Grammar> is a built-in grammar class that can be used as
a parent class for a custom grammar. This class defines a number of rules and
@@ -291,13 +289,13 @@
=back
-=head2 PCT::HLLCompiler
+=head3 PCT::HLLCompiler
All PCT-based compilers use a HLLCompiler object as a compiler driver.
It acts as a I<facade> for the compiler. This object invokes the different
compiler phases.
-=head3 HLLCompiler API Methods
+=head4 HLLCompiler API Methods
{{ TODO: complete this }}
@@ -334,11 +332,11 @@
=back
-=head1 ATTACHMENTS
+=head2 Attachments
None.
-=head1 REFERENCES
+=head2 References
docs/pdd26_ast.pod
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd30_install.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd30_install.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd30_install.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,11 +1,9 @@
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Parrot Installation
-docs/pdds/draft/pdd30_install.pod - Parrot Installation
-
-=head1 ABSTRACT
+=head2 Abstract
This PDD outlines Parrot's installation system and support. Parrot's core
installation system will provide support for binary packages, a working C<make
@@ -14,11 +12,11 @@
accessing installed source-only files, and to allow the optimization of config
bootstrapping if a frozen config_hash is already linked.
-=head1 VERSION
+=head2 Version
$Revision$
-=head1 SYNOPSIS
+=head2 Synopsis
Parrot installation process (from the parrot source directory):
@@ -34,7 +32,7 @@
make test
make install
-=head1 DESCRIPTION
+=head2 Description
Parrot uses Filesystem Hierarchy Standard (FHS) compliant install directories
by default. Each install location is configurable with options passed to the
@@ -124,7 +122,7 @@
adds the blib/lib path to PATH resp. LD_RUN_PATH to all parrot executable
invocations.
-=head1 DEPENDENCIES
+=head2 Dependencies
Building core Parrot depends on Perl (including perldoc, which may be a
separate package), libgdm and libreadline.
@@ -134,7 +132,7 @@
in the default C<parrot> package on most systems, but will require a
C<parrot-dev> package to be installed before they can be built.
-=head1 DEFINITIONS
+=head2 Definitions
The B<build_dir> is the full path where Parrot was built. It is defined
in the configuration hash. When building from source the C<build_dir> is also
@@ -158,7 +156,7 @@
(F<config.fpmc>), the installable executable (F<install_config.fpmc>) or empty
for miniparrot (F<null_config.fpmc>).
-=head2 make install
+=head3 make install
The Parrot build system is currently optimized for building and testing in
the build directory, but not for building with an already installed
@@ -170,8 +168,8 @@
Parrot, its libraries and tools, and its languages so that packagers can
provide binary packages for parrot and its languages.
-The longer-term goal is a framework so that external libraries and languages
-not within the current parrot source tree can also be properly built, tested
+The longer-term goal is a framework so that external libraries and languages
+not within the current parrot source tree can also be properly built, tested
and installed.
We do not only support GNU make or Win32 nmake but also other platform make
@@ -222,7 +220,7 @@
=back
-=head2 Configuration bootstrapping
+=head3 Configuration bootstrapping
Bootstrapping the configuration hash should not read a config file when the
hash is already contained in the PMC or executable. C<.include
@@ -234,7 +232,7 @@
a hack to work around earlier limitations in the build system. This is an
ideal opportunity to eliminate the hack. -allison}}
-=head2 Accessing not-installed files
+=head3 Accessing not-installed files
B<Makefile and MANIFEST cleanup>
@@ -290,7 +288,7 @@
Source loading PIR statements like C<loadlib> and C<load_bytecode> should
cache the file name and skip the file if it has already been loaded (as in
-perl5)
+perl5)
B<Fix 3>: pbc_merge fixups
@@ -298,7 +296,7 @@
load_bytecode pbc-files which are being merged, but hacking bytecode during
pbc_merge is not desirable.
-=head1 IMPLEMENTATION
+=head2 Implementation
A new language is generated by F<tools/dev/mk_language_shell.pl>
@@ -312,15 +310,15 @@
installation maintenance. The entry point could be a Makefile.pl or
Makefile.pir then.
-=head1 ATTACHMENTS
+=head2 Attachments
None.
-=head1 FOOTNOTES
+=head2 Footnotes
None.
-=head1 REFERENCES
+=head2 References
=cut
Modified: branches/vtable_morph_change/docs/pdds/draft/pdd31_hll_interop.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/draft/pdd31_hll_interop.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/draft/pdd31_hll_interop.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -1,21 +1,19 @@
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
# $Id$
-=head1 NAME
+=head1 Inter-language calling
-docs/pdds/pddxx_language_interop.pod - Inter-language calling
-
-=head1 VERSION
+=head2 Version
$Revision$
-=head1 ABSTRACT
+=head2 Abstract
This PDD describes Parrot's conventions and support for communication between
high-level languages (HLLs). It is focused mostly on what implementors should
do in order to provide this capability to their users.
-=head1 DESCRIPTION
+=head2 Description
The ability to mix different high-level languages at runtime has always been
an important design goal of Parrot. Another important goal, that of
@@ -33,7 +31,7 @@
However, this PDD B<is> binding on Parrot implementors, who must provide a
stable platform for language interoperability to the language implementors.
-=head2 Ground rules
+=head3 Ground rules
In order to avoid N**2 complexity and the resulting coordination headaches,
each language compiler provides an interface as a target for other languages
@@ -137,11 +135,11 @@
=back
-=head1 HALF-BAKED IDEAS
+=head2 Half-Baked Ideas
{{ Every draft PDD should have one of these. ;-} -- rgr, 28-Jul-08. }}
-=head2 Common syntax for declaring exported functions?
+=head3 Common syntax for declaring exported functions?
I assume we will need some additional namespace support. Not clear yet
whether it's better to mark the ones that or OK for external calling, or the
@@ -168,7 +166,7 @@
{{ Proposal rejected, because we aren't going with "external" and "internal"
subroutine variants, so it's not needed. --allison }}
-=head2 More namespace complexity?
+=head3 More namespace complexity?
{{ Proposal rejected, because we aren't going with "external" and "internal"
subroutine variants, so it's not needed. --allison }}
@@ -192,7 +190,7 @@
{{ Of course, this wouldn't be necessary if all external subs were multisubs.
-- rgr, 31-Jul-08. }}
-=head2 Multiple type hierarchies?
+=head3 Multiple type hierarchies?
Different languages will have to "dress up" the Parrot type/class hierarchy
differently. For example, Common Lisp specifies that C<STRING> is a subtype
@@ -225,14 +223,14 @@
{{ Absolutely not true. --allison }}
-=head1 DEFINITIONS
+=head2 Definitions
{{ Collect definitions of new jargon words here, once we figure out what they
should be. -- rgr, 29-Jul-08. }}
-=head1 IMPLEMENTATION
+=head2 Implementation
-=head2 Plain Parrot Semantics
+=head3 Plain Parrot Semantics
Fortunately, "plain Parrot" is pretty powerful, so the "common denominator" is
not in fact the lowest possible. For example, not all Parrot languages
@@ -244,13 +242,13 @@
{{ This needs more? -- rgr, 28-Jul-08. }}
-=head2 Strings
+=head3 Strings
{{ I am probably not competent to write this section. At the very least,
it requires discussion of languages that expect strings to be mutable
versus . . . Java. -- rgr, 28-Jul-08. }}
-=head2 Other scalar data types
+=head3 Other scalar data types
All Parrot language implementations should stick to native Parrot PMC types
for scalar data, except in case of dire need. To see with this is so, take
@@ -296,7 +294,7 @@
{{ Must also discuss morphing: If some languages do it and other do not, then
care must be taken at the boundaries. -- rgr, 31-Jul-08. }}
-=head3 Defining new scalar data types
+=head4 Defining new scalar data types
There will be cases where existing Parrot PMC classes cannot represent a
primitive HLL scalar type, and so a new PMC class is required. In this case,
@@ -395,7 +393,7 @@
The rest of this section details exceptions and caveats in dealing with scalar
data types.
-=head3 "Fuzzy" scalars
+=head4 "Fuzzy" scalars
Some languages are willing to coerce strings to numbers and vice versa without
any special action on the part of the programmer and others are not. The
@@ -411,7 +409,7 @@
scalar, and what to do if that value is later used as an integer again.
--allison }}
-=head3 C<Complex> numbers
+=head4 C<Complex> numbers
Not all languages support complex numbers, so if an exported function requires
a complex argument, it should either throw a suitable error, or coerce an
@@ -423,7 +421,7 @@
and what results it returns, there's nothing unique about complex numbers.
--allison }}
-=head3 C<Ratio> numbers
+=head4 C<Ratio> numbers
Not all languages support ratios (rather few, actually), so if an exported
function requires a ratio as an argument, it should either throw a suitable
@@ -440,7 +438,7 @@
{{ Parrot does not support these yet, so this is not a current issue. --
rgr, 28-Jul-08. }}
-=head2 Aggregate data types
+=head3 Aggregate data types
{{ I probably haven't done these issues justice; I don't know enough Java or
Tcl to grok this part of the list discussion. -- rgr, 28-Jul-08. }}
@@ -476,7 +474,7 @@
{{ Not clear where you're going with this --allison }}
-=head2 Functional data types
+=head3 Functional data types
In a sense, functional types (i.e. callable objects) are the easiest things to
pass across languages, since they require no mapping at all. On the other
@@ -486,7 +484,7 @@
{{ Hmmm? They're just subs, how would they not be callable from another
language? --allison }}
-=head2 Datum vs. object
+=head3 Datum vs. object
Some languages present everything to the programmer as an object; in such
languages, code only exists in methods. A few languages have no methods, only
@@ -519,7 +517,7 @@
what you're describing here isn't introspection, it's actually the standard
vtable functions. --allison }}
-=head3 Defining methods across language boundaries
+=head4 Defining methods across language boundaries
{{ Is the term "unimethod" acceptable here? -- rgr, 29-Jul-08. They're just
methods or subroutines, and it's just "single dispatch". --allison}}
@@ -569,7 +567,7 @@
{{ Not sure what you mean here. --allison }}
-=head3 Subclassing across language boundaries
+=head4 Subclassing across language boundaries
{{ This is an important feature, but requires compatible metamodels. -- rgr,
29-Jul-08.
@@ -578,7 +576,7 @@
metamodel boundaries. --allison
}}
-=head3 Method vs. multimethod
+=head4 Method vs. multimethod
{{ This is the issue where some languages (e.g. Common Lisp) use only
multimethods, where others (e.g. Ruby) use only unimethods. (S04 says
@@ -595,7 +593,7 @@
the primary focus of language interoperability. Using libraries from other
languages is. --allison }}
-=head1 REFERENCES
+=head2 References
None.
Modified: branches/vtable_morph_change/docs/pdds/pdd00_pdd.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/pdd00_pdd.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/pdd00_pdd.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -3,7 +3,7 @@
=head1 Parrot Design Documents
-=head1 Version
+=head2 Version
$Revision$
@@ -147,7 +147,8 @@
=head3 Submission Criteria
Proposed PDDs should be submitted to the parrot-dev mailing list (located
-at parrot-dev at lists.parrot.org) for discussion, criticism and general kibitzing.
+at parrot-dev at lists.parrot.org) for discussion, criticism and general
+kibitzing.
Acceptance of a particular PDD is ultimately up to the Parrot Architect.
=head3 PDD Translations
Modified: branches/vtable_morph_change/docs/pdds/pdd20_lexical_vars.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/pdd20_lexical_vars.pod Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/docs/pdds/pdd20_lexical_vars.pod Tue Feb 10 15:54:03 2009 (r36539)
@@ -386,7 +386,7 @@
None.
-=head1 References
+=head2 References
=over 4
Modified: branches/vtable_morph_change/examples/pir/pirric.pir
==============================================================================
--- branches/vtable_morph_change/examples/pir/pirric.pir Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/examples/pir/pirric.pir Tue Feb 10 15:54:03 2009 (r36539)
@@ -1440,7 +1440,7 @@
print curline
print ']'
- unless debugger goto executeline
+ unless debugger goto executeline
debug_break
executeline:
@@ -1617,7 +1617,7 @@
debugger = getattribute self, 'debugger'
say 'Ready'
-
+
reinit:
unless debugger goto doreadline
debug_break
Modified: branches/vtable_morph_change/include/parrot/pmc.h
==============================================================================
--- branches/vtable_morph_change/include/parrot/pmc.h Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/include/parrot/pmc.h Tue Feb 10 15:54:03 2009 (r36539)
@@ -40,7 +40,7 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-void dod_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -93,7 +93,7 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-void dod_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -115,7 +115,7 @@
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_constant_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_dod_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_gc_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pmc)
#define ASSERT_ARGS_Parrot_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -139,7 +139,7 @@
#define ASSERT_ARGS_pmc_type_p __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(name)
-#define ASSERT_ARGS_dod_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_gc_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pmc)
#define ASSERT_ARGS_get_new_vtable_index __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Copied: branches/vtable_morph_change/languages/cola/TODO (from r36538, trunk/languages/cola/TODO)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/vtable_morph_change/languages/cola/TODO Tue Feb 10 15:54:03 2009 (r36539, copy of r36538, trunk/languages/cola/TODO)
@@ -0,0 +1,20 @@
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into cola's new
+ticketing system, whatever that may be.
+
+#48198: [TODO] [cola] Add support for member resolution in lookup_type()
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48198
+
+#48200: [TODO] [cola] Add documentation to files and functions
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48200
+
+#48202: [TODO] [cola] Rewrite push_sym() to call generic Node versions of calls
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48202
+
+#48204: [TODO] [cola] Check method signature in gen_arg_list_expr() and find out what type is expected
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48204
+
+#48206: [TODO] [cola] Check that expression evaluates to a method in gen_method_call()
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48206
Modified: branches/vtable_morph_change/languages/dotnet/TODO
==============================================================================
--- branches/vtable_morph_change/languages/dotnet/TODO Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/languages/dotnet/TODO Tue Feb 10 15:54:03 2009 (r36539)
@@ -58,3 +58,20 @@
* Try and make a GUI app run!
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into dotnet's new
+ticketing system, whatever that may be.
+
+#58590: [PATCH] dotnet make
+ http://rt.perl.org/rt3/Ticket/Display.html?id=58590
+
+#48130: [TODO] [dotnet] Why does sig_token have to be set to 0xFFFF in make_bytecde_pmc()?
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48130
+
+#48128: [TODO] [dotnet] Does a null first byte need special handling in dotnetsignature.pmc?
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48128
+
+#42349: [TODO] dotnet - fix various ops for 64 bit architectures
+ http://rt.perl.org/rt3/Ticket/Display.html?id=42349
Modified: branches/vtable_morph_change/languages/pheme/TODO
==============================================================================
--- branches/vtable_morph_change/languages/pheme/TODO Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/languages/pheme/TODO Tue Feb 10 15:54:03 2009 (r36539)
@@ -67,3 +67,13 @@
- port?
- predicates are disjoint
- empty list satisfies none
+
+
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into pheme's new
+ticketing system, whatever that may be.
+
+#60208: [BUG] pheme -- t/null test fails in r32229
+ http://rt.perl.org/rt3/Ticket/Display.html?id=60208
Copied: branches/vtable_morph_change/languages/regex/TODO (from r36538, trunk/languages/regex/TODO)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/vtable_morph_change/languages/regex/TODO Tue Feb 10 15:54:03 2009 (r36539, copy of r36538, trunk/languages/regex/TODO)
@@ -0,0 +1,14 @@
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into regex's new
+ticketing system, whatever that may be.
+
+#48168: [TODO] [regex] Implement init_pmc
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48168
+
+#48170: [TODO] [regex] Remove 'use of uninitialized value' issues in match.pmc
+ http://rt.perl.org/rt3/Ticket/Display.html?id=48170
+
+#42393: [TODO] regex - FIXME items in languages/regex/lib/Regex/Grammar.y
+ http://rt.perl.org/rt3/Ticket/Display.html?id=42393
Modified: branches/vtable_morph_change/lib/Parrot/Pmc2c/Attribute.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Pmc2c/Attribute.pm Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/lib/Parrot/Pmc2c/Attribute.pm Tue Feb 10 15:54:03 2009 (r36539)
@@ -104,6 +104,7 @@
my $isptrtostring = qr/STRING\s*\*$/;
my $isptrtopmc = qr/PMC\s*\*$/;
+ my $inherit = 1;
my $decl = <<"EOA";
/* Generated macro accessors for '$attrname' attribute of $pmcname PMC. */
@@ -116,21 +117,21 @@
$decl .= <<"EOA";
PMC *attr_value = VTABLE_get_attr_str(interp, \\
pmc, Parrot_str_new_constant(interp, "$attrname")); \\
- (dest) = VTABLE_get_integer(interp, attr_value); \\
+ (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \\
EOA
}
elsif ($attrtype eq "FLOATVAL") {
$decl .= <<"EOA";
PMC *attr_value = VTABLE_get_attr_str(interp, \\
pmc, Parrot_str_new_constant(interp, "$attrname")); \\
- (dest) = VTABLE_get_number(interp, attr_value); \\
+ (dest) = (PMC_IS_NULL(attr_value) ? (FLOATVAL) 0.0: VTABLE_get_number(interp, attr_value)); \\
EOA
}
elsif ($attrtype =~ $isptrtostring) {
$decl .= <<"EOA";
PMC *attr_value = VTABLE_get_attr_str(interp, \\
pmc, Parrot_str_new_constant(interp, "$attrname")); \\
- (dest) = VTABLE_get_string(interp, attr_value); \\
+ (dest) = (PMC_IS_NULL(attr_value) ? (STRING *) 0: VTABLE_get_string(interp, attr_value)); \\
EOA
}
elsif ($attrtype =~ $isptrtopmc) {
@@ -141,6 +142,7 @@
}
else {
+ $inherit = 0;
$decl .= <<"EOA";
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \\
"Attributes of type '$attrtype' cannot be " \\
@@ -206,6 +208,8 @@
EOA
+ $self->{inherit} = $inherit;
+
$h->emit($decl);
return 1;
Modified: branches/vtable_morph_change/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Pmc2c/PMCEmitter.pm Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/lib/Parrot/Pmc2c/PMCEmitter.pm Tue Feb 10 15:54:03 2009 (r36539)
@@ -435,6 +435,7 @@
NULL, /* isa_hash */
NULL, /* class */
NULL, /* mro */
+ attr_defs, /* attribute_defs */
NULL, /* ro_variant_vtable */
$methlist
};
@@ -487,6 +488,34 @@
void
Parrot_${classname}_class_init(PARROT_INTERP, int entry, int pass)
{
+ static const char attr_defs [] =
+EOC
+ $cout .= ' "';
+
+ my $attributes = $self->attributes;
+ foreach my $attribute ( @$attributes ) {
+ my $attrtype = $attribute->{type};
+ my $typeid = ':'; # Unhandled
+ if ($attrtype eq "INTVAL") {
+ $typeid = 'I';
+ }
+ elsif ($attrtype eq "FLOATVAL") {
+ $typeid = 'F';
+ }
+ elsif ($attrtype =~ /STRING\s*\*$/) {
+ $typeid = 'S';
+ }
+ elsif ($attrtype =~ /PMC\s*\*$/) {
+ $typeid = 'F';
+ }
+
+ $cout .= $typeid;
+ $cout .= $attribute->name;
+ $cout .= ' ';
+ }
+
+ $cout .= "\";\n";
+ $cout .= <<"EOC";
$vtable_decl
EOC
Modified: branches/vtable_morph_change/lib/Parrot/Test.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Test.pm Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/lib/Parrot/Test.pm Tue Feb 10 15:54:03 2009 (r36539)
@@ -966,9 +966,7 @@
? ""
: "-L$PConfig{blib_dir} "))
. ($^O =~ m/MSWin32/
- ? File::Spec->join(
- @PConfig{qw/build_dir libparrot_ldflags/},
- )
+ ? $PConfig{libparrot_ldflags}
: "-lparrot")
: File::Spec->join(
@PConfig{qw/build_dir blib_dir libparrot_static/},
Modified: branches/vtable_morph_change/lib/Parrot/Vtable.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Vtable.pm Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/lib/Parrot/Vtable.pm Tue Feb 10 15:54:03 2009 (r36539)
@@ -175,6 +175,7 @@
PMC *pmc_class; /* for PMCs: a PMC of that type
for objects: the class PMC */
PMC *mro; /* array PMC of [class, parents ... ] */
+ const char *attribute_defs; /* list of PMC attributes */
struct _vtable *ro_variant_vtable; /* A variant of this vtable with the
opposite IS_READONLY flag */
/* Vtable Functions */
Modified: branches/vtable_morph_change/ports/debian/copyright
==============================================================================
--- branches/vtable_morph_change/ports/debian/copyright Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/ports/debian/copyright Tue Feb 10 15:54:03 2009 (r36539)
@@ -15,9 +15,6 @@
languages/cola/:
Copyright (C) 2002 Melvin Smith <melvin.smith at mindspring.com>
-languages/regex/lib/Regex/Grammar.pm:
-(c) Copyright 1998-2001 Francois Desarmenien, all rights reserved.
-
languages/urm:
2003 (c) by Marcus Thiesen
Modified: branches/vtable_morph_change/src/extend.c
==============================================================================
--- branches/vtable_morph_change/src/extend.c Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/extend.c Tue Feb 10 15:54:03 2009 (r36539)
@@ -1311,7 +1311,7 @@
{
ASSERT_ARGS(Parrot_register_pmc)
PARROT_CALLIN_START(interp);
- dod_register_pmc(interp, pmc);
+ gc_register_pmc(interp, pmc);
PARROT_CALLIN_END(interp);
}
@@ -1333,7 +1333,7 @@
{
ASSERT_ARGS(Parrot_unregister_pmc)
PARROT_CALLIN_START(interp);
- dod_unregister_pmc(interp, pmc);
+ gc_unregister_pmc(interp, pmc);
PARROT_CALLIN_END(interp);
}
Modified: branches/vtable_morph_change/src/inter_call.c
==============================================================================
--- branches/vtable_morph_change/src/inter_call.c Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/inter_call.c Tue Feb 10 15:54:03 2009 (r36539)
@@ -2778,7 +2778,7 @@
/* Invoke the subroutine object with the given CallSignature object */
Parrot_pcc_invoke_from_sig_object(interp, sub_obj, sig_obj);
- dod_unregister_pmc(interp, sig_obj);
+ gc_unregister_pmc(interp, sig_obj);
}
Modified: branches/vtable_morph_change/src/inter_cb.c
==============================================================================
--- branches/vtable_morph_change/src/inter_cb.c Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/inter_cb.c Tue Feb 10 15:54:03 2009 (r36539)
@@ -125,7 +125,7 @@
* we need to anchor it.
*
*/
- dod_register_pmc(interp, user_data);
+ gc_register_pmc(interp, user_data);
/*
* Finally, the external lib awaits a function pointer.
@@ -142,7 +142,7 @@
PMC_data(cb) = F2DPTR(Parrot_callback_C);
else
PMC_data(cb) = F2DPTR(Parrot_callback_D);
- dod_register_pmc(interp, cb);
+ gc_register_pmc(interp, cb);
return cb;
}
Modified: branches/vtable_morph_change/src/io/buffer.c
==============================================================================
--- branches/vtable_morph_change/src/io/buffer.c Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/io/buffer.c Tue Feb 10 15:54:03 2009 (r36539)
@@ -656,6 +656,9 @@
Parrot_io_get_file_position(interp, filehandle)));
Parrot_io_flush(interp, filehandle);
+ buffer_flags |= PIO_BF_WRITEBUF;
+ Parrot_io_set_buffer_flags(interp, filehandle, buffer_flags);
+
buffer_next = Parrot_io_get_buffer_next(interp, filehandle);
memmove(buffer_start, ((const char *)buffer + avail), diff);
Modified: branches/vtable_morph_change/src/ops/pmc.ops
==============================================================================
--- branches/vtable_morph_change/src/ops/pmc.ops Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/ops/pmc.ops Tue Feb 10 15:54:03 2009 (r36539)
@@ -562,11 +562,11 @@
=cut
op register(invar PMC) {
- dod_register_pmc(interp, $1);
+ gc_register_pmc(interp, $1);
}
op unregister(invar PMC) {
- dod_unregister_pmc(interp, $1);
+ gc_unregister_pmc(interp, $1);
}
Modified: branches/vtable_morph_change/src/pmc.c
==============================================================================
--- branches/vtable_morph_change/src/pmc.c Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/pmc.c Tue Feb 10 15:54:03 2009 (r36539)
@@ -749,11 +749,11 @@
=back
-=head2 DOD registry interface
+=head2 GC registry interface
=over 4
-=item C<void dod_register_pmc>
+=item C<void gc_register_pmc>
Registers the PMC with the interpreter's DOD registry.
@@ -763,9 +763,9 @@
PARROT_EXPORT
void
-dod_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
{
- ASSERT_ARGS(dod_register_pmc)
+ ASSERT_ARGS(gc_register_pmc)
/* Better not trigger a DOD run with a potentially unanchored PMC */
Parrot_block_GC_mark(interp);
@@ -778,7 +778,7 @@
/*
-=item C<void dod_unregister_pmc>
+=item C<void gc_unregister_pmc>
Unregisters the PMC from the interpreter's DOD registry.
@@ -787,9 +787,9 @@
*/
void
-dod_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
{
- ASSERT_ARGS(dod_unregister_pmc)
+ ASSERT_ARGS(gc_unregister_pmc)
PARROT_ASSERT(interp->DOD_registry);
VTABLE_delete_keyed(interp, interp->DOD_registry, pmc);
Modified: branches/vtable_morph_change/src/pmc/addrregistry.pmc
==============================================================================
--- branches/vtable_morph_change/src/pmc/addrregistry.pmc Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/pmc/addrregistry.pmc Tue Feb 10 15:54:03 2009 (r36539)
@@ -213,7 +213,7 @@
=head1 SEE ALSO
-F<src/pmc.c:dod_register_pmc()>
+F<src/pmc.c:gc_register_pmc()>
=cut
Modified: branches/vtable_morph_change/src/pmc/exceptionhandler.pmc
==============================================================================
--- branches/vtable_morph_change/src/pmc/exceptionhandler.pmc Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/pmc/exceptionhandler.pmc Tue Feb 10 15:54:03 2009 (r36539)
@@ -192,20 +192,22 @@
STRING * const sev = CONST_STRING(interp, "severity");
STRING * const ex_str = CONST_STRING(interp, "Exception");
- Parrot_ExceptionHandler_attributes * const core_struct =
- PARROT_EXCEPTIONHANDLER(SELF);
INTVAL severity = VTABLE_get_integer_keyed_str(interp, exception, sev);
if (exception->vtable->base_type == enum_class_Exception
|| VTABLE_isa(INTERP, exception, ex_str)) {
- PMC * handled_types;
+ PMC *handled_types;
+ PMC *handled_types_except;
+ INTVAL min_severity, max_severity;
GET_ATTR_handled_types(INTERP, SELF, handled_types);
+ GET_ATTR_handled_types_except(INTERP, SELF, handled_types_except);
+ GET_ATTR_max_severity(INTERP, SELF, max_severity);
+ GET_ATTR_min_severity(INTERP, SELF, min_severity);
- if (severity < core_struct->min_severity) {
+ if (severity < min_severity) {
RETURN(INTVAL 0);
}
- if (core_struct->max_severity > 0
- && severity > core_struct->max_severity) {
+ if (max_severity > 0 && severity > max_severity) {
RETURN(INTVAL 0);
}
if (! PMC_IS_NULL(handled_types)) {
@@ -222,22 +224,21 @@
RETURN(INTVAL 0);
}
- if (core_struct->handled_types_except != PMCNULL) {
- const INTVAL elems = VTABLE_elements(interp, core_struct->handled_types_except);
+ if (handled_types_except != PMCNULL) {
+ const INTVAL elems = VTABLE_elements(interp, handled_types_except);
const INTVAL type = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "type"));
INTVAL i;
for (i = 0; i < elems; i++) {
const INTVAL handled_type = VTABLE_get_integer_keyed_int(interp,
- core_struct->handled_types_except, i);
+ handled_types_except, i);
if (handled_type == type)
RETURN(INTVAL 0);
}
RETURN(INTVAL 1);
}
- else if (core_struct->max_severity > 0 ||
- core_struct->min_severity > 0) {
+ else if (max_severity > 0 || min_severity > 0) {
RETURN(INTVAL 1);
}
Modified: branches/vtable_morph_change/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/vtable_morph_change/src/pmc/pmcproxy.pmc Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/pmc/pmcproxy.pmc Tue Feb 10 15:54:03 2009 (r36539)
@@ -160,6 +160,26 @@
Parrot_oo_extract_methods_from_namespace(interp, SELF,
proxy_info->_namespace);
}
+
+ { /* Create inherited attributes */
+ /* Each attribute is prefixed with his type
+ * and terminated by an space,
+ * the list is '\0' terminated
+ */
+ const char * attr = interp->vtables[type_num]->attribute_defs;
+ while (* attr) {
+ const char * const current = attr + 1;
+ size_t l;
+ char attrtype = * attr;
+ while (* attr != ' ') ++attr;
+ l= attr - current;
+ if (attrtype != ':') {
+ STRING *sattr = Parrot_str_new(interp, current, l);
+ SELF.add_attribute(sattr, NULL);
+ }
+ ++attr;
+ }
+ }
}
/*
Modified: branches/vtable_morph_change/src/thread.c
==============================================================================
--- branches/vtable_morph_change/src/thread.c Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/src/thread.c Tue Feb 10 15:54:03 2009 (r36539)
@@ -1344,7 +1344,7 @@
* dying interpreter, so register it in parent's DOD registry
* XXX is this still needed?
*/
- dod_register_pmc(parent, parent_ret);
+ gc_register_pmc(parent, parent_ret);
Parrot_unblock_GC_mark(parent);
retval = parent_ret;
}
@@ -1368,7 +1368,7 @@
* value, caller gets it now
*/
if (retval)
- dod_unregister_pmc(parent, retval);
+ gc_unregister_pmc(parent, retval);
return retval;
}
Modified: branches/vtable_morph_change/t/compilers/imcc/syn/pcc.t
==============================================================================
--- branches/vtable_morph_change/t/compilers/imcc/syn/pcc.t Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/t/compilers/imcc/syn/pcc.t Tue Feb 10 15:54:03 2009 (r36539)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Config;
-use Parrot::Test tests => 21;
+use Parrot::Test tests => 22;
##############################
# Parrot Calling Conventions
@@ -524,7 +524,23 @@
my $too_many_args_args = join ',', 1 .. 20_000;
$too_many_args =~ s/_ARGS_/$too_many_args_args/;
-pir_output_is( $too_many_args, "didn't segfault\n", "calling a sub with way too many params" );
+pir_output_is( $too_many_args, "didn't segfault\n", "calling a sub with way too many args" );
+
+my $too_many_params = <<'CODE';
+.sub main :main
+ 'foo'()
+ say "didn't segfault"
+.end
+
+.sub foo
+ _PARAMS_
+.end
+CODE
+
+my $too_many_params_params = join map { " .param pmc xx$_\n" } 1 .. 20_000;
+$too_many_params =~ s/_PARAMS_/$too_many_params_params/;
+
+pir_output_is( $too_many_params, "didn't segfault\n", "calling a sub with way too many params" );
# Local Variables:
# mode: cperl
Modified: branches/vtable_morph_change/t/pmc/exceptionhandler.t
==============================================================================
--- branches/vtable_morph_change/t/pmc/exceptionhandler.t Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/t/pmc/exceptionhandler.t Tue Feb 10 15:54:03 2009 (r36539)
@@ -123,7 +123,7 @@
push_eh outcatch
$I0 = subclass_handler_catches(myhandler)
outcatch:
- todo($I0, 'Exception Handler subclass catch exception')
+ ok($I0, 'Exception Handler subclass catch exception')
.end
.sub subclass_exception_handler
@@ -178,9 +178,11 @@
throw $P0
subclassed_failed:
+ .get_results($P0)
.return(0)
subclassed_handler:
+ .get_results($P0)
.return(1)
.end
@@ -200,9 +202,11 @@
throw $P0
subclassed_failed:
+ .get_results($P0)
.return(0)
subclassed_handler:
+ .get_results($P0)
.return(1)
.end
Modified: branches/vtable_morph_change/t/src/compiler.t
==============================================================================
--- branches/vtable_morph_change/t/src/compiler.t Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/t/src/compiler.t Tue Feb 10 15:54:03 2009 (r36539)
@@ -61,7 +61,7 @@
}
/* keep eval PMC alive */
- dod_register_pmc(interp, prog);
+ gc_register_pmc(interp, prog);
/* locate function to run */
smain = Parrot_str_new_constant(interp, "main");
@@ -128,7 +128,7 @@
}
/* keep eval PMC alive */
- dod_register_pmc(interp, prog);
+ gc_register_pmc(interp, prog);
/* locate function to run */
smain = Parrot_str_new_constant(interp, "main");
@@ -221,7 +221,7 @@
}
/* keep eval PMC alive */
- dod_register_pmc(interp, prog);
+ gc_register_pmc(interp, prog);
/* locate function to run */
smain = Parrot_str_new_constant(interp, "main");
@@ -314,7 +314,7 @@
}
/* keep eval PMC alive */
- dod_register_pmc(interp, prog);
+ gc_register_pmc(interp, prog);
/* locate function to run */
smain = Parrot_str_new_constant(interp, "main");
@@ -406,7 +406,7 @@
}
/* keep eval PMC alive */
- dod_register_pmc(interp, prog);
+ gc_register_pmc(interp, prog);
/* locate function to run */
smain = Parrot_str_new_constant(interp, "main");
Modified: branches/vtable_morph_change/t/tools/pmc2c.t
==============================================================================
--- branches/vtable_morph_change/t/tools/pmc2c.t Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/t/tools/pmc2c.t Tue Feb 10 15:54:03 2009 (r36539)
@@ -93,6 +93,8 @@
void
Parrot_a_class_init(PARROT_INTERP, int entry, int pass)
{
+ static const char attr_defs [] =
+ "";
const VTABLE temp_base_vtable = {
END_C
Modified: branches/vtable_morph_change/tools/install/smoke.pl
==============================================================================
--- branches/vtable_morph_change/tools/install/smoke.pl Tue Feb 10 15:42:28 2009 (r36538)
+++ branches/vtable_morph_change/tools/install/smoke.pl Tue Feb 10 15:54:03 2009 (r36539)
@@ -9,7 +9,7 @@
use Getopt::Long;
use File::Spec::Functions;
-use Test::More tests => 25;
+use Test::More tests => 23;
=head1 NAME
@@ -24,7 +24,7 @@
parrot in .
- % perl tools/install/smoke.pl --bindir=.
+ % perl tools/install/smoke.pl --bindir=. --libdir=./runtime
test installation in DESTDIR:
@@ -86,10 +86,6 @@
ok(system("$parrot -V") == 0, "display parrot version");
-$exe = catfile($bindir, 'perl6');
-$out = `$exe -v`;
-ok($out =~ /Rakudo/, "check rakudo");
-
#
# some compiler tools
#
@@ -167,6 +163,8 @@
ok($out eq "Hello World from JS\n\n", "check ecmascript");
unlink($filename);
+TODO: {
+local $TODO = "lisp is currently broken";
$filename = 'test.l';
open $FH, '>', $filename
or die "Can't open $filename ($!).\n";
@@ -175,6 +173,7 @@
$out = `$parrot languages/lisp/lisp.pbc $filename`;
ok($out eq "Hello, World!\n", "check lisp");
unlink($filename);
+}
$filename = 'test.lolcode';
open $FH, '>', $filename
@@ -195,9 +194,6 @@
$out = `$parrot languages/ook/ook.pbc`;
ok($out eq q{}, "check ook");
-$out = `$parrot languages/perl6/perl6.pbc -e "say 'hello world'"`;
-ok($out eq "hello world\n", "check rakudo");
-
$filename = 'test.l';
open $FH, '>', $filename
or die "Can't open $filename ($!).\n";
More information about the parrot-commits
mailing list