# Copyright (C) 2005-2007, The Perl Foundation.
# $Id: /mirror/trunk/docs/ROADMAP.pod 32813 2008-11-17T21:37:52.612928Z coke  $

=head1 NAME

ROADMAP - A plan for parrot 1.0 and beyond.

=head1 OTHER DOCUMENTS

See L<https://trac.parrot.org/parrot/wiki/ParrotRoadmap>, created at
the Parrot Developer Summit in November 2008.

=head1 PURPOSE

A high level overview of the work that is remaining to release parrot 1.0,
including both user-visibile features and internals.

For detailed information regarding specific tasks, we will refer to
L<https://rt.perl.org/rt3>.

For a high level overview of funded parrot milestones for 1.0, please see:
L<http://www.perlfoundation.org/parrot_grant_from_nlnet>

This document also contains information about future direction after 1.0.

=head1 LAYOUT

Each task is associated with a B<major> release of parrot. Additionally,
each task will refer to its current state, and a link to any documentation
regarding the task (i.e. something on Launchpad, RT, or in the repository,
or on the wiki). Tasks with no supporting documentation will be marked
[Unspecifed].

=head1 1.0

=head2 Features

I<TBD>

=head2 Quality

While the 1.0 release must pass all of these quality goals, future releases
will of course adhere to these standards as well.

=over 4

=item * All known GC bugs must be resolved

=item * All known segfaults must be resolved

=item * All features must have comprehensive tests

=item * All features must have comprehensive documentation

=item * All tests must pass on all core platforms

=item * Remove obsolete code/documentation.

Eliminate dead documentation.  Let historians dig through our subversion
history.  We look forward toward successful deployment. -Chip

=back

=head1 2.0

=head2 Build System

=over 4

=item * Eliminate perl5 build requirement. [Unspecified]

Parrot currently requires perl5 to build. Eventually we wish to
eliminate this requirement.

=back

=head1 UNREVIEWED CONTENT

The contents of this file are outdated and must be reviewed.
See RT #48611.  All content beyond this point needs to be validated.

=head1 OVERVIEW

The remaining tasks are broken down into the following categories, roughly
listed in the order through which a task might progress.

=head2 DOCUMENTATION

=over 4

=item *

When docs and code disagree, they must be brought into agreement immediately.
At the I<very> least, appropriately mark docs that are apparently wrong but may
eventually become right, e.g.: "C<[NOTE: this does not currently work.  Why?
--committer]>".

PDDs are not exceptions to this rule!  Fix them when they're wrong.  Delete
them when they're obsolete.  (Never delete docs lightly, though.  Check first
with someone who should know.)

=item *

Document project goals and priorities.

=back

=head2 DESIGN

=over 4

=item *

MMD Roundup 2, from the mailing list:

L<http://xrl.us/gvfw> (Link to groups-beta.google.com)

Section 1 of that email needs a decision from the Architect.

=item *

Design the standard library to replace all those opcodes that should never have
been opcodes in the first place, e.g. the IO and transcendental math features.

(Note: Whatever tech we use to implement transcendental math should at *worst*
compile to function calls under JIT.  And I'll consider making exceptions for
the transcendantal math if someone can show me why.)

I expect PIR will still let you pretend they're opcodes, though, to avoid
immediate howls of outrage.  (But only silicon-based life forms write PASM, so
we're not worried about that.)

=item *

Finish event and IO specification.

=item *

Finish specification of return continuation and sub being called slots in
interpreter, with introspection

=item *

Spec out bytecode metadata system and introspection/modification system

=item *

Specify what we need to serialize continuations

=item *

Solidify design for Truly Evil speed hack for fast regex/string matching

=item *

Describe the behavior of the serialization functions. (freeze, thaw,
thawfinish, visit). L<PDD02>

=item *

Describe the behavior of C<share>. L<PDD02>

=item *

Describe the components of a C<struct PMC_EXT>. L<PDD04>

=item *

Define what bits of the Parrot internals should be exposed as part of the
Parrot API for extension writers.

=back

=head2 TODO

=over 4

=item *

IO: Add IO tables, right now IO's just float around.

=item *

Finish PMC for IO object

=item *

IO's "stdio" layer: buffering, seek/random access, shared streams, thread safe

=item *

Copy-on-write IO stacks

=item *

Make IO layer cache the vtable calls to the next layer.

=item *

IO Filters

=item *

IO mmap support

=item *

Bottom level socket/pipe/process support in API

=item *

UTF layers (or should we not bother and do as a filter?)

=item *

Sample programs and test suite

=item *

AIO - On many platforms we must fake async IO, are we doing a background
thread/interp or an inline event queue function that is called every N ops?

=item *

Get digest (probably SHA1) added to bytecode segments

=item *

Speed up the OrderedHash implementation

=item *

Rearchitect internals for the string specifications.

=item *

To PerlClass or not to PerlClass, that is the question. The class hierarchy
should be reworked (e.g. Boolean->PerlInt->Scalar).

=item *

Configuration - missing tests for processor features

=item *

Configuration - duplication, e.g. nvsize/numvalsize

=item *

IO - Async core isn't there yet, even though it is rumoured to be.

=item *

Overflow detection/promotion to bigint/float types.

=item *

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. L<PDD14>

[[What's an EDA? --Coke]]

=item *

TODO - rewrite debugger.

=back

=head2 BUGFIX

=over 4

=item *

You can add parents to a class with children and objects, and attributes to a
class with children or objects. This is silently allowed and quietly corrupts
the child classes and instantiated objects.

=item *

building miniparrot is broken

=item *

GC issue (copying collector) - immobile strings/buffers get freed during GC.

=item *

Memory leak - PIO subsystem leaks file handles (ParrotIO structures)

=item *

Memory leak - string_to_cstring returns a malloced string, which isn't freed
everywhere

=item *

Memory Leaks - imcc is currently leaking Unit structures and possibly more

=item *

JIT - 64 bit integers on 32 bit machines don't work

=item *

JIT - parrot register inspection is incomplete (P-regs)

=item *

This sequence:

   loop: dec I0
         inc I1       # or add, sub, ...
         if I0, loop

isn't handled correctly on JIT/i386.

=item *

C<Parrot_destroy> currently leaks most of the memory that it is supposed to
free. L<embed.pod>

=back

=head2 PORTABILITY

=over 4

=item *

Portable fcntl() replacement for platforms without it

=item *

See F<pdds/draft/pdd01_overview.pod>. Test suite should have no
failure on supported platforms.

=item *

Tests - src/tests are not supported on all platforms

=item *

ParrotIO uses integral file descriptors, which may not be portable.
F<src/ops/io.ops>

=item *

conversion ops for machines without 1/2/4 byte integer data types

=item *

32 bit pointer/64 bit integer and vv.

=item *

dynamic library loading

=back

=cut
