Skip to content

Commit

Permalink
merge html_cleanup branch with trunk
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/html_cleanup@48139 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
mikehh committed Jul 20, 2010
2 parents 58142f3 + 4b53831 commit ee2ab72
Show file tree
Hide file tree
Showing 61 changed files with 34,281 additions and 32,573 deletions.
3 changes: 1 addition & 2 deletions CREDITS
Expand Up @@ -129,8 +129,7 @@ D: Keeps us running
E: ask@develooper.com

N: Audrey Tang
U: audreyt
U: autrijus
U: au
E: audreyt@audreyt.org
D: Pugs, a Perl6->Parrot implementation.

Expand Down
52 changes: 47 additions & 5 deletions DEPRECATED.pod
Expand Up @@ -43,6 +43,18 @@ deprecations specifically by including this snippet:

=over 4

=item Task [eligible in 2.7]

For the gsoc_threads branch, the word "Task" has been stolen
for Green Threads. If this branch is merged, the current task PMC
may be renamed or removed and related behavior may change.

L<http://trac.parrot.org/parrot/ticket/1709>

=item ParrotThread [eligible in 2.7]

L<http://trac.parrot.org/parrot/ticket/1708>

=item GzipHandle [experimental]

L<https://trac.parrot.org/parrot/ticket/1580>
Expand Down Expand Up @@ -305,6 +317,27 @@ As of the latest PCC changes, this does nothing different from '.call'.

L<https://trac.parrot.org/parrot/ticket/1624>

=item :main Sub behaviour and selection. [eligible in 2.7]

Currently, if no :main sub is found, the first .sub in a file is used as
main. Also, arguments are passed to the main sub regardless of the .param
declarations in that sub.

After this change, if no sub is marked with :main, an exception will be
raised. Multiple :main declarations will be still be allowed, and all but the
first will be ignored.

This change will also force all subs, including :main, to have their
arguments checked - to allow an arbitrary number of arguments, have
this be the only .param declaration in the sub.

.param pmc args :slurpy


L<https://trac.parrot.org/parrot/ticket/1033>
L<https://trac.parrot.org/parrot/ticket/1704>
L<https://trac.parrot.org/parrot/ticket/1705>

=back

=head1 Functions
Expand Down Expand Up @@ -406,13 +439,22 @@ use a different detection mechanism or eliminate it altogether.

L<https://trac.parrot.org/parrot/ticket/463>

=item PAST::Val node generation [eligible in 1.5]
=item PAST::Val node generation [eligible in 1.5]

The PAST::Compiler may generate the code for PAST::Val nodes
(i.e., constants) at the beginning of the block (Parrot sub) instead
of the location where they occur in the PAST tree.

L<https://trac.parrot.org/parrot/ticket/868>

The PAST::Compiler may generate the code for PAST::Val nodes
(i.e., constants) at the beginning of the block (Parrot sub) instead
of the location where they occur in the PAST tree.
=item Meta-model implementation used by PCT [eligible in 2.7]

L<https://trac.parrot.org/parrot/ticket/868>
PCT is set to switch to a new meta-model implementation for its classes
and objects. This will most likely only affect those who rely on the
interface of what is returned from .HOW, or rely on PCT objects exhibiting
various other peculiarities of the P6object implementation. (Even when that
is the case, the HOW API will not be changing too drastically, so for most
PCT users there should be little to no upheavel.)

=back

Expand Down
9 changes: 6 additions & 3 deletions MANIFEST
Expand Up @@ -626,6 +626,7 @@ examples/languages/abc/t/abc_functions [examples]
examples/languages/abc/t/abc_special_variables [examples]
examples/languages/abc/t/abc_statement [examples]
examples/languages/squaak/MAINTAINER [examples]
examples/languages/squaak/PARROT_REVISION [examples]
examples/languages/squaak/README [examples]
examples/languages/squaak/doc/tutorial_episode_1.pod [examples]
examples/languages/squaak/doc/tutorial_episode_2.pod [examples]
Expand All @@ -640,9 +641,11 @@ examples/languages/squaak/examples/factorial.sq [examples]
examples/languages/squaak/examples/life.sq [examples]
examples/languages/squaak/setup.pir [examples]
examples/languages/squaak/squaak.pir [examples]
examples/languages/squaak/src/builtins/say.pir [examples]
examples/languages/squaak/src/parser/actions.pm [examples]
examples/languages/squaak/src/parser/grammar.pg [examples]
examples/languages/squaak/src/Squaak/Actions.pm [examples]
examples/languages/squaak/src/Squaak/Compiler.pm [examples]
examples/languages/squaak/src/Squaak/Grammar.pm [examples]
examples/languages/squaak/src/Squaak/Runtime.pm [examples]
examples/languages/squaak/src/squaak.pir [examples]
examples/languages/squaak/t/00-sanity.t [examples]
examples/languages/squaak/t/01-math.t [examples]
examples/library/acorn.life [examples]
Expand Down
7 changes: 7 additions & 0 deletions NEWS
@@ -1,5 +1,12 @@
# $Id$

New in 2.6.0
- Platforms
+ The Fedora package 'parrot-devel' install the files for syntax-highlighting
and automatic indenting for the vim editor.
- Documentation
+ Updated the Squaak tutorial to use modern NQP-rx and PCT.

New in 2.5.0
- Core
+ Added ByteBuffer PMC to allow direct byte manipulation
Expand Down
2 changes: 1 addition & 1 deletion compilers/imcc/pbc.c
Expand Up @@ -1465,7 +1465,7 @@ add_const_pmc_sub(PARROT_INTERP, ARGMOD(SymReg *r), size_t offs, size_t end)
if (unit->vtable_name) {
vtable_name = Parrot_str_new(interp, unit->vtable_name + 1,
strlen(unit->vtable_name) - 2);
UNIT_FREE_CHAR(unit->method_name);
UNIT_FREE_CHAR(unit->vtable_name);
}
else
vtable_name = sub->name;
Expand Down
1 change: 1 addition & 0 deletions compilers/pct/src/PAST/Compiler.pir
Expand Up @@ -28,6 +28,7 @@ basic flags are:
+ PMC, int register, num register, or numeric constant
~ PMC, string register, or string constant
: argument (same as '*'), possibly with :named or :flat
0-9 use the nth input operand as the output result of this operation

These flags are used to describe signatures and desired return
types for various operations. For example, if an opcode is
Expand Down
2 changes: 1 addition & 1 deletion config/gen/core_pmcs.pm
Expand Up @@ -76,7 +76,7 @@ END_H
END_H
print {$OUT} coda();

close $OUT or die "Can't close file: $!";;
close $OUT or die "Can't close file: $!";

move_if_diff( "$file.tmp", $file );

Expand Down
6 changes: 5 additions & 1 deletion config/gen/makefiles/editor.in
@@ -1,4 +1,4 @@
# Copyright (C) 2005-2009, Parrot Foundation.
# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$

#IF(win32):VIM_DIR = $(USERPROFILE)/vimfiles
Expand All @@ -13,6 +13,9 @@ CP = @cp@
MKPATH = @mkpath@
RM_F = @rm_f@

SKEL_FILE_DIR = `$(PERL) -e 'print "$(SKELETON)" || "$(VIM_DIR)"'`
LINE = "au BufNewFile *.pir 0r $(SKEL_FILE_DIR)/skeleton.pir"

default: all

all: pir.vim imc.kate skeleton.pir
Expand Down Expand Up @@ -49,6 +52,7 @@ vim-install: pir.vim skeleton.pir
$(CP) pmc.vim "$(VIM_SYN_DIR)"
$(MKPATH) "$(VIM_FT_DIR)"
$(CP) filetype_parrot.vim "$(VIM_FT_DIR)/parrot.vim"
echo $(LINE) >> "$(VIM_FT_DIR)/parrot.vim"
$(MKPATH) "$(VIM_IN_DIR)"
$(CP) indent_pir.vim "$(VIM_IN_DIR)/pir.vim"

Expand Down
6 changes: 3 additions & 3 deletions config/gen/platform/generic/env.c
Expand Up @@ -74,13 +74,13 @@ UnSet Environment vars
void
Parrot_unsetenv(PARROT_INTERP, STRING *str_name)
{
char * const name = Parrot_str_to_cstring(interp, str_name);
#ifdef PARROT_HAS_UNSETENV
char * const name = Parrot_str_to_cstring(interp, str_name);
unsetenv(name);
Parrot_str_free_cstring(name);
#else
Parrot_setenv(name, "");
Parrot_setenv(interp, str_name, Parrot_str_new(interp, "", 0));
#endif
Parrot_str_free_cstring(name);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion docs/book/pir/ch04_variables.pod
Expand Up @@ -182,7 +182,7 @@ it's true and the second argument otherwise:

$P0 = or $P1, $P2

=end PIR_FRAGMENT_INVALID[
=end PIR_FRAGMENT_INVALID

Both C<and> and C<or> are short-circuiting ops. If they can determine what
value to return from the first argument, they'll never evaluate the second.
Expand Down
4 changes: 4 additions & 0 deletions docs/project/release_manager_guide.pod
Expand Up @@ -261,6 +261,10 @@ works well for use Perl and PerlMonks, and text for the rest. It is not a
bad idea to add a "highlights" section to draw attention to major new
features, just be sure to say the same thing in both text and HTML versions.

Compute the SHA1 sum of the tarball and append it to the release announcement:

$ sha1sum parrot-a.b.c.tar.gz

=item 10.

Update the website. You will need an account with editor rights
Expand Down
20 changes: 13 additions & 7 deletions docs/project/support_policy.pod
Expand Up @@ -71,13 +71,19 @@ After a feature is announced as deprecated, it might not appear in the
next supported release. We sometimes delay removing deprecated features
for various reasons, including dependencies by other parts of the core.

The developer releases have more flexibility in feature removal, while
still meeting the deprecation requirements for support releases. A
feature that has a deprecation notification in the 2.0 release may be
removed from any monthly developer release between 2.0 and the next
supported release, though we're likely to stagger the removals. An
experimental feature that was never included in a supported release may
be removed before a supported release without a deprecation cycle.
The developer releases have more flexibility in feature removal, while still
meeting the deprecation requirements for support releases. A feature that has a
deprecation notification in the 2.0 release may be removed from any monthly
developer release between 2.0 and the next supported release, though we're
likely to stagger the removals.

=head2 Experimental Features

From time to time, we may add features to get feedback on their utility and
design. Marking them as "Experimental" in F<DEPRECATED.pod> indicates that we
may modify or remove them without official deprecation notices. Use them at
your own risk--and please provide feedback through official channels if you use
them successfully or otherwise.

=head2 Supported Older Versions

Expand Down
16 changes: 11 additions & 5 deletions editor/README.pod
Expand Up @@ -14,14 +14,20 @@ your favorite editor. For a summary on what is available do

=head2 Vim

Calling C<make vim-install> in the F<editor/> directory will
install several files in F<~/.vim>. All these files have the F<.vim>
By default calling C<make vim-install> in the F<editor/> directory will
install several files in F<~/.vim>. You can use the variable C<VIM_DIR>
on the command line by calling C<make> to choose a different target directory
for the vim files.

make vim-install [VIM_DIR=/vim_files_target_directory]

All these files have the F<.vim>
extension. F<pir.vim> (generated from F<pir_vim.in>), F<pasm.vim>, and
F<pmc.vim> are syntax files; F<indent_pir.vim> is an indent plugin;
and F<filetype_parrot.vim> is a filetype script that tells vim to
associate the extensions .pir, .pasm, and .pmc with the
right syntax. The syntax files are installed to F<~/.vim/syntax/>;
F<filetype_parrot.vim> is installed to F<~/.vim/ftdetect>;
F<filetype_parrot.vim> is installed to F<~/.vim/parrot.vim>;
F<indent_pir.vim> is copied to F<~/.vim/indent/pir.vim>. If you want
indenting, you should also place C<filetype indent on> somewhere in
your F<~/.vimrc>.
Expand All @@ -35,7 +41,7 @@ Run:

in F<editor/> to build it.

TODO: How do we install Kate syntax files?
Copy the file F<imcc.xml> to F<~/.kde/share/apps/katepart/syntax>.

=head2 Emacs

Expand Down Expand Up @@ -77,7 +83,7 @@ Additionally, you might want to add:
(function (lambda ()
(setq indent-tabs-mode nil))))

to F<~/.emacs> as this seems to prevent the odd behavior that is noted when
to F<~/.emacs> as this seems to prevent the odd behavior that is noted when
using tabs in the pasm mode.

=back
Expand Down
1 change: 0 additions & 1 deletion editor/filetype_parrot.vim
@@ -1,4 +1,3 @@
au BufNewFile,BufRead *.pmc set ft=pmc cindent
au BufNewFile,BufRead *.pasm set ft=pasm ai sw=4
au BufNewFile,BufRead *.pir set ft=pir ai sw=4
au BufNewFile *.pir 0r ~/.vim/skeleton.pir
5 changes: 3 additions & 2 deletions examples/languages/squaak/MAINTAINER
@@ -1,4 +1,5 @@
# $Id$

N: Klaas-Jan Stol (kj,kjs)
E: parrotcode at gmail dot com
N: Tyler Curtis
U: tcurtis
E: tyler.l.curtis@gmail.com
1 change: 1 addition & 0 deletions examples/languages/squaak/PARROT_REVISION
@@ -0,0 +1 @@
47087
52 changes: 3 additions & 49 deletions examples/languages/squaak/README
@@ -1,51 +1,5 @@
Squaak: A Simple Language

Squaak is a case-study language described in the Parrot Compiler Tools
tutorial at http://www.parrotblog.org/2008/03/targeting-parrot-vm.html.

Note that Squaak is NOT an implementation Squeak; it has nothing to do
with any SmallTalk implementation.

Squaak demonstrates some common language constructs, but at the same
time is currently lacking some other, seemingly simple features. For instance,
Squaak does not have break or continue statements (or equivalents
in your favorite syntax). Once PCT has built-in support for these, they
will be added.

Squaak has the following features:

* global and local variables
* basic types: integer, floating-point and strings
* aggregate types: arrays and hash tables
* operators: +, -, /, *, %, <, <=, >, >=, ==, !=, .., and, or, not
* subroutines and parameters
* assignments and various control statements, such as "if" and "while" and "return"
* library functions: print, read

A number of common (more advanced) features are missing.
Most notable are:

* classes and objects
* exceptional control statements such as break and continue
* advanced control statements such as switch
* closures (nested subroutines and accessing local variables in an outer scope)

Squaak is designed to be a simple showcase language, to show the use of the
Parrot Compiler Tools for implementing a language.

In order to use Squaak:

$ make

Running Squaak in interactive mode:

$ ../../parrot squaak.pbc

Running Squaak with a file (for instance, the included Game of Life example):

$ ../../parrot squaak.pbc examples/life.sq

Bug reports and improvements can be sent to the maintainer or Parrot porters
mailing list.
Language 'Squaak' was created with tools/dev/mk_language_shell.pl, r47087.

$ parrot setup.pir
$ parrot setup.pir test

0 comments on commit ee2ab72

Please sign in to comment.