[svn:parrot] r40083 - in branches/tt761_keys_revamp: . compilers/imcc compilers/nqp/src compilers/nqp/src/Grammar compilers/pct/src/PCT compilers/pge/PGE compilers/tge config/gen/makefiles ext/SQLite3 include/parrot lib/Parrot src src/gc src/pmc t/compilers/pge/perl6regex t/pmc tools/dev
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Jul 14 14:47:12 UTC 2009
Author: bacek
Date: Tue Jul 14 14:47:08 2009
New Revision: 40083
URL: https://trac.parrot.org/parrot/changeset/40083
Log:
Bring branch up-to-date with trunk.
Added:
branches/tt761_keys_revamp/src/gc/gc_inf.c
Modified:
branches/tt761_keys_revamp/DEPRECATED.pod
branches/tt761_keys_revamp/MANIFEST
branches/tt761_keys_revamp/MANIFEST.generated
branches/tt761_keys_revamp/PLATFORMS
branches/tt761_keys_revamp/compilers/imcc/imcc.l
branches/tt761_keys_revamp/compilers/imcc/imclexer.c
branches/tt761_keys_revamp/compilers/nqp/src/Grammar.pg
branches/tt761_keys_revamp/compilers/nqp/src/Grammar/Actions.pir
branches/tt761_keys_revamp/compilers/pct/src/PCT/HLLCompiler.pir
branches/tt761_keys_revamp/compilers/pge/PGE/Exp.pir
branches/tt761_keys_revamp/compilers/pge/PGE/Match.pir
branches/tt761_keys_revamp/compilers/pge/PGE/Perl6Regex.pir
branches/tt761_keys_revamp/compilers/pge/PGE/Regex.pir
branches/tt761_keys_revamp/compilers/tge/tgc.pir
branches/tt761_keys_revamp/config/gen/makefiles/dynpmc.in
branches/tt761_keys_revamp/config/gen/makefiles/root.in
branches/tt761_keys_revamp/ext/SQLite3/Makefile.PL
branches/tt761_keys_revamp/ext/SQLite3/Makefile.in
branches/tt761_keys_revamp/include/parrot/gc_api.h
branches/tt761_keys_revamp/include/parrot/interpreter.h
branches/tt761_keys_revamp/include/parrot/settings.h
branches/tt761_keys_revamp/lib/Parrot/OpsFile.pm
branches/tt761_keys_revamp/src/gc/alloc_resources.c
branches/tt761_keys_revamp/src/gc/api.c
branches/tt761_keys_revamp/src/gc/gc_private.h
branches/tt761_keys_revamp/src/gc/mark_sweep.c
branches/tt761_keys_revamp/src/hash.c
branches/tt761_keys_revamp/src/hll.c
branches/tt761_keys_revamp/src/pmc/class.pmc
branches/tt761_keys_revamp/src/pmc/pmcproxy.pmc
branches/tt761_keys_revamp/src/pmc_freeze.c
branches/tt761_keys_revamp/src/thread.c
branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_lookarounds
branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_subrules
branches/tt761_keys_revamp/t/pmc/exception.t
branches/tt761_keys_revamp/tools/dev/install_files.pl
branches/tt761_keys_revamp/tools/dev/pbc_to_exe.pir
Modified: branches/tt761_keys_revamp/DEPRECATED.pod
==============================================================================
--- branches/tt761_keys_revamp/DEPRECATED.pod Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/DEPRECATED.pod Tue Jul 14 14:47:08 2009 (r40083)
@@ -267,32 +267,6 @@
=head1 Compiler tools
-=head2 Parrot Grammar Engine
-
-=over 4
-
-=item Deprecated rules and methods [eligible in 1.1]
-
-The following "built-in" PGE rules and methods are from previous
-versions of Synopsis 5.
-
-Deprecated rules:
- C<null>, C<fail>, C<sp>, C<lt>, C<gt>, C<dot>
-
-Deprecated methods:
- C<.text>, C<.item>, C<.result_object>
-
-L<https://trac.parrot.org/parrot/ticket/460>
-
-=item Stringification, numification [eligible in 1.1]
-
-C< PGE::Match > objects will stringify or numify based on
-the text that is matched, not the result object.
-
-L<https://trac.parrot.org/parrot/ticket/461>
-
-=back
-
=head2 Parrot Compiler Toolkit
=over 4
Modified: branches/tt761_keys_revamp/MANIFEST
==============================================================================
--- branches/tt761_keys_revamp/MANIFEST Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/MANIFEST Tue Jul 14 14:47:08 2009 (r40083)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Fri Jul 10 06:43:50 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Jul 12 15:39:35 2009 UT
#
# See below for documentation on the format of this file.
#
@@ -1272,6 +1272,7 @@
src/gc/alloc_register.c []
src/gc/alloc_resources.c []
src/gc/api.c []
+src/gc/gc_inf.c []
src/gc/gc_malloc.c []
src/gc/gc_ms.c []
src/gc/gc_private.h []
Modified: branches/tt761_keys_revamp/MANIFEST.generated
==============================================================================
--- branches/tt761_keys_revamp/MANIFEST.generated Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/MANIFEST.generated Tue Jul 14 14:47:08 2009 (r40083)
@@ -47,6 +47,7 @@
include/parrot/platform_limits.h [devel]include
include/parrot/vtable.h [main]include
install_config.fpmc [main]lib
+src/install_config.o [main]lib
installable_parrot_config.exe [main]bin
installable_parrot_config [main]bin
installable_parrot_debugger.exe [main]bin
Modified: branches/tt761_keys_revamp/PLATFORMS
==============================================================================
--- branches/tt761_keys_revamp/PLATFORMS Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/PLATFORMS Tue Jul 14 14:47:08 2009 (r40083)
@@ -40,11 +40,12 @@
freebsd-x86-gcc-4.2.1 4 Y Y Y ? ? Y Y Y 20090415
freebsd-amd64-gcc-4.2.1 8 Y - - ? ? Y Y Y 20090419
linux-amd64-clang-r73854 8 ? ? = Y Y Y/4 Y/1 ? 20090622
+linux-amd64-clang-r75433 8 Y N ? ? ? Y Y ? 20090712
linux-ppc-gcc3.4.5 Y Y Y ? ? Y Y ? 20080519
linux-s390x-gcc4.1.2 B4 ? - - Y Y Y Y/2 ? 20080908
-linux-x86_64-gcc4.1.2 8 Y - - Y Y Y Y ? 20080220
-linux-x86_64-gcc4.3.2 8 Y - - Y Y Y Y ? 20081118
-linux-x86_64-gcc4.3.3 8 Y - - Y Y Y Y ? 20090517
+linux-amd64-gcc4.1.2 8 Y - - Y Y Y Y ? 20080220
+linux-amd64-gcc4.3.2 8 Y - - Y Y Y Y ? 20081118
+linux-amd64-gcc4.3.3 8 Y Y ? Y Y Y Y ? 20090712
netbsd3.1-ppc-gcc-3.3.3 B Y Y ? Y Y Y Y ? 20090419
netbsd4.0-alpha-gcc-4.1.2 8 Y - ? Y Y Y Y ? 20090518
netbsd4.0-arm-gcc-4.1.2 Y - ? Y Y Y Y ? 20090518
Modified: branches/tt761_keys_revamp/compilers/imcc/imcc.l
==============================================================================
--- branches/tt761_keys_revamp/compilers/imcc/imcc.l Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/imcc/imcc.l Tue Jul 14 14:47:08 2009 (r40083)
@@ -1325,7 +1325,7 @@
compile_file(PARROT_INTERP, FILE *file, void *yyscanner)
{
yyguts_t * const yyg = (yyguts_t *)yyscanner;
- YY_BUFFER_STATE buffer;
+ YY_BUFFER_STATE volatile buffer;
IMCC_INFO(interp)->frames->s.next = NULL;
buffer = YY_CURRENT_BUFFER;
@@ -1358,7 +1358,7 @@
compile_string(PARROT_INTERP, const char *s, void *yyscanner)
{
yyguts_t * const yyg = (yyguts_t *)yyscanner;
- YY_BUFFER_STATE buffer;
+ YY_BUFFER_STATE volatile buffer;
IMCC_INFO(interp)->frames->s.next = NULL;
buffer = YY_CURRENT_BUFFER;
Modified: branches/tt761_keys_revamp/compilers/imcc/imclexer.c
==============================================================================
--- branches/tt761_keys_revamp/compilers/imcc/imclexer.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/imcc/imclexer.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -5737,7 +5737,7 @@
compile_file(PARROT_INTERP, FILE *file, void *yyscanner)
{
yyguts_t * const yyg = (yyguts_t *)yyscanner;
- YY_BUFFER_STATE buffer;
+ YY_BUFFER_STATE volatile buffer;
IMCC_INFO(interp)->frames->s.next = NULL;
buffer = YY_CURRENT_BUFFER;
@@ -5769,7 +5769,7 @@
compile_string(PARROT_INTERP, const char *s, void *yyscanner)
{
yyguts_t * const yyg = (yyguts_t *)yyscanner;
- YY_BUFFER_STATE buffer;
+ YY_BUFFER_STATE volatile buffer;
IMCC_INFO(interp)->frames->s.next = NULL;
buffer = YY_CURRENT_BUFFER;
Modified: branches/tt761_keys_revamp/compilers/nqp/src/Grammar.pg
==============================================================================
--- branches/tt761_keys_revamp/compilers/nqp/src/Grammar.pg Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/nqp/src/Grammar.pg Tue Jul 14 14:47:08 2009 (r40083)
@@ -59,7 +59,7 @@
.return (1)
end:
}}
- <fail>
+ <!>
}
@@ -127,7 +127,7 @@
if $P0 != $P2 goto end
.return (1)
end:
- }} <fail>
+ }} <!>
}
token MARK_STATEMENT_END {
Modified: branches/tt761_keys_revamp/compilers/nqp/src/Grammar/Actions.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/nqp/src/Grammar/Actions.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/nqp/src/Grammar/Actions.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -346,7 +346,7 @@
not_quote:
if key != 'heredoc' goto not_heredoc
$P0 = match['text']
- inline = $P0.'text'()
+ inline = $P0.'Str'()
not_heredoc:
make:
$P1 = get_hll_global ['PAST'], 'Op'
Modified: branches/tt761_keys_revamp/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/pct/src/PCT/HLLCompiler.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/pct/src/PCT/HLLCompiler.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -471,7 +471,7 @@
compile_match:
#push_eh err_past
.local pmc ast
- ast = source.'item'()
+ ast = source.'ast'()
#pop_eh
$I0 = isa ast, ['PAST';'Node']
unless $I0 goto err_past
Modified: branches/tt761_keys_revamp/compilers/pge/PGE/Exp.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/pge/PGE/Exp.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/pge/PGE/Exp.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -988,6 +988,7 @@
.local string token, test
token = self.'ast'()
+ if token == '<?>' goto anchor_null
if token == '^' goto anchor_bos
if token == '$' goto anchor_eos
if token == '^^' goto anchor_bol
@@ -1001,6 +1002,15 @@
test = '=='
if token == '\B' goto anchor_word
+ anchor_fail:
+ code.'emit'(" %0: # anchor fail %1", label, token)
+ code.'emit'(" goto fail")
+ .return ()
+
+ anchor_null:
+ code.'emit'(" %0: # anchor null %1", label, token)
+ code.'emit'(" goto %0", next)
+ .return ()
anchor_bos:
code.'emit'(" %0: # anchor bos", label)
Modified: branches/tt761_keys_revamp/compilers/pge/PGE/Match.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/pge/PGE/Match.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/pge/PGE/Match.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -235,10 +235,6 @@
.return ('')
.end
-.sub 'text' :method
- .tailcall self.'Str'()
-.end
-
=item C<orig()>
@@ -252,23 +248,6 @@
.end
-=item C<item()>
-
-Returns the scalar value of this match -- the "result object"
-if there is one, otherwise the substring matched by this match
-object.
-
-=cut
-
-.sub 'item' :method
- .tailcall self.'ast'()
-.end
-
-.sub 'result_object' :method
- .param pmc obj
- .tailcall self.'!make'(obj)
-.end
-
=item C<!make(pmc obj)>
Sets the "ast object" for the Match invocant.
Modified: branches/tt761_keys_revamp/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/pge/PGE/Perl6Regex.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/pge/PGE/Perl6Regex.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -324,6 +324,8 @@
optable.'newtok'('term:\B', 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
optable.'newtok'('term:<<', 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
optable.'newtok'('term:>>', 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:<?>', 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
+ optable.'newtok'('term:<!>', 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
optable.'newtok'(unicode:"term:\xab", 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
optable.'newtok'(unicode:"term:\xbb", 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Anchor')
@@ -1244,7 +1246,7 @@
failsub = mob.'new'(mob, 'grammar'=>'PGE::Exp::Subrule')
failsub.'to'(pos)
failsub['subname'] = 'FAILGOAL'
- $S0 = goal.'text'()
+ $S0 = goal.'Str'()
failsub['arg'] = $S0
alt = mob.'new'(mob, 'grammar'=>'PGE::Exp::Alt')
alt.'to'(pos)
Modified: branches/tt761_keys_revamp/compilers/pge/PGE/Regex.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/pge/PGE/Regex.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/pge/PGE/Regex.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -59,33 +59,6 @@
.end
-=item C<null()>
-
-Match a null string (always returns true on first match).
-
-=cut
-
-.sub "null" :method
- .local pmc mob
- .local int pos
- $P0 = get_hll_global ['PGE'], 'Match'
- (mob, pos) = $P0.'new'(self)
- mob.'to'(pos)
- .return (mob)
-.end
-
-=item C<fail()>
-
-Force a backtrack. (Taken from A05.)
-
-=cut
-
-.sub "fail" :method
- $P0 = get_hll_global ['PGE'], 'Match'
- .tailcall $P0.'new'(self)
-.end
-
-
=item C<alpha()>
Match a single alphabetic character.
@@ -226,45 +199,6 @@
.tailcall '!cclass'(self, .CCLASS_ALPHANUMERIC)
.end
-=item C<sp()>
-
-Match a single space character. (Taken from E05.)
-
-=cut
-
-.sub "sp" :method
- .tailcall '!literal'(self, ' ')
-.end
-
-=item C<lt()>
-
-Match a single left angle bracket. (Taken from E05.)
-
-=cut
-
-.sub "lt" :method
- .tailcall '!literal'(self, '<')
-.end
-
-=item C<gt()>
-
-Match a single right angle bracket. (Taken from E05.)
-
-=cut
-
-.sub "gt" :method
- .tailcall '!literal'(self, '>')
-.end
-
-=item C<dot()>
-
-Match a single dot ('.'). (Taken from E05.)
-
-=cut
-
-.sub "dot" :method
- .tailcall '!literal'(self, '.')
-.end
=item C<ws()>
@@ -373,7 +307,7 @@
.local pmc mob, cache, rule
if has_pattern goto lookahead
- mob = 'fail'(self)
+ mob = '!fail'(self)
.return (mob)
lookahead:
cache = get_global '%!cache'
@@ -422,7 +356,7 @@
mob = self
if has_pattern goto lookbehind
- mob = fail(mob)
+ mob = '!fail'(mob)
.return (mob)
lookbehind:
pattern = concat '[', pattern
@@ -483,13 +417,27 @@
=over 4
+
+=item C<!fail>
+
+Force a backtrack. (Taken from A05.)
+
+=cut
+
+.sub "!fail" :anon
+ .param pmc mob
+ $P0 = get_hll_global ['PGE'], 'Match'
+ .tailcall $P0.'new'(mob)
+.end
+
+
=item C<!cclass(mob, cclass)>
Match according to character class C<cclass>.
=cut
-.sub '!cclass'
+.sub '!cclass' :anon
.param pmc mob
.param int cclass
@@ -510,7 +458,7 @@
=cut
-.sub '!literal'
+.sub '!literal' :anon
.param pmc mob
.param string literal
.local string target
Modified: branches/tt761_keys_revamp/compilers/tge/tgc.pir
==============================================================================
--- branches/tt761_keys_revamp/compilers/tge/tgc.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/compilers/tge/tgc.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -89,6 +89,12 @@
.local string compiled_source
compiled_source = grammar.'precompile'(source, infile)
print outfh, compiled_source
+ unless ck_output goto END
+
+ # Close the output file and check result
+ $I0 = outfh.'close'()
+ unless $I0 goto END
+ die 'Error: close output failed'
goto END
Modified: branches/tt761_keys_revamp/config/gen/makefiles/dynpmc.in
==============================================================================
--- branches/tt761_keys_revamp/config/gen/makefiles/dynpmc.in Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/config/gen/makefiles/dynpmc.in Tue Jul 14 14:47:08 2009 (r40083)
@@ -67,10 +67,6 @@
#ELSIF(win32):LIB_CRYPTO := libcrypto.lib
#ELSE:LIB_CRYPTO := -lcrypto
-# some *.pmc file are generated
-GEN_PMC_DEFINITIONS := \
-#IF(has_crypto): $(PMCS_DIGEST)
-
CLEANUPS := \
"*.c" \
"pmc_*.h" \
@@ -272,7 +268,7 @@
$(RM_F) $(CLEANUPS)
realclean:
- $(RM_F) $(CLEANUPS) Makefile $(GEN_PMC_DEFINITIONS)
+ $(RM_F) $(CLEANUPS) Makefile
distclean: realclean
Modified: branches/tt761_keys_revamp/config/gen/makefiles/root.in
==============================================================================
--- branches/tt761_keys_revamp/config/gen/makefiles/root.in Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/config/gen/makefiles/root.in Tue Jul 14 14:47:08 2009 (r40083)
@@ -175,6 +175,22 @@
#IF(has_opengl): config/gen/call_list/opengl.in \
#IF(has_glut): $(SRC_DIR)/glut_callbacks.c \
$(SRC_DIR)/core_pmcs.c \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/md2.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/md4.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/md5.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/ripemd160.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/sha.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/sha1.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/sha256.pmc \
+#IF(has_crypto): $(SRC_DIR)/dynpmc/sha512.pmc \
+#IF(has_crypto): t/dynpmc/md2.t \
+#IF(has_crypto): t/dynpmc/md4.t \
+#IF(has_crypto): t/dynpmc/md5.t \
+#IF(has_crypto): t/dynpmc/ripemd160.t \
+#IF(has_crypto): t/dynpmc/sha.t \
+#IF(has_crypto): t/dynpmc/sha1.t \
+#IF(has_crypto): t/dynpmc/sha256.t \
+#IF(has_crypto): t/dynpmc/sha512.t \
CFLAGS \
$(IMCC_DIR)/CFLAGS \
config_lib.pasm \
@@ -413,6 +429,7 @@
$(SRC_DIR)/gc/generational_ms$(O) \
$(SRC_DIR)/gc/incremental_ms$(O) \
$(SRC_DIR)/gc/gc_ms$(O) \
+ $(SRC_DIR)/gc/gc_inf$(O) \
$(SRC_DIR)/gc/mark_sweep$(O) \
$(SRC_DIR)/gc/system$(O) \
$(SRC_DIR)/global$(O) \
@@ -1095,6 +1112,8 @@
$(SRC_DIR)/gc/gc_ms$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/gc/gc_ms.c
+$(SRC_DIR)/gc/gc_inf$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/gc/gc_inf.c
+
$(SRC_DIR)/gc/api$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/gc/gc_private.h
$(SRC_DIR)/gc/generational_ms$(O) : $(GENERAL_H_FILES)
@@ -1796,15 +1815,6 @@
"t/stress/*.pbc" \
"t/tools/*.pbc"
$(RM_F) \
- "t/dynpmc/md2.t" \
- "t/dynpmc/md4.t" \
- "t/dynpmc/md5.t" \
- "t/dynpmc/ripemd160.t" \
- "t/dynpmc/sha.t" \
- "t/dynpmc/sha1.t" \
- "t/dynpmc/sha256.t" \
- "t/dynpmc/sha512.t"
- $(RM_F) \
"t/src/*.c" \
"t/src/*.pdb" \
"t/src/*.manifest"
@@ -1828,7 +1838,6 @@
# a failing step of cleaning, usually doesn't concern the following steps
realclean : clean
-$(MAKE) compilers/pirc realclean
- -$(MAKE) src/dynpmc realclean
$(RM_RF) \
$(CONFIGURE_GENERATED_FILES) \
blib \
Modified: branches/tt761_keys_revamp/ext/SQLite3/Makefile.PL
==============================================================================
--- branches/tt761_keys_revamp/ext/SQLite3/Makefile.PL Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/ext/SQLite3/Makefile.PL Tue Jul 14 14:47:08 2009 (r40083)
@@ -1,5 +1,5 @@
use lib '../../lib';
use Parrot::Configure;
my $pc = Parrot::Configure->new();
-$pc->data->slurp();
+$pc->data->get_PConfig();
$pc->genfile("Makefile.in" => "Makefile");
Modified: branches/tt761_keys_revamp/ext/SQLite3/Makefile.in
==============================================================================
--- branches/tt761_keys_revamp/ext/SQLite3/Makefile.in Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/ext/SQLite3/Makefile.in Tue Jul 14 14:47:08 2009 (r40083)
@@ -61,16 +61,15 @@
.c$(O) :
@$(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
-#PERL6=../../perl6
-PERL6=../../parrot ../../languages/perl6/perl6.pbc
+PERL6=../../parrot ../../languages/rakudo/perl6.pbc
all :
- cd ../..; make perl6
+ cd ../..; make all
cd ../../compilers/ncigen; $(PERL6) ../../ext/SQLite3/gen_sqlite3.pl /usr/include/sqlite3.h > ../../ext/SQLite3/genSQLite3.pir
test:
$(RM_F) test.db t/test.db
- PERL6LIB=../../languages/perl6 $(PERL6) t/test.p6
+ PERL6LIB=../../languages/rakudo $(PERL6) t/test.p6
$(SHARED_LIB) : $(C_FILES)
$(MKPATH) @blib_dir@
Modified: branches/tt761_keys_revamp/include/parrot/gc_api.h
==============================================================================
--- branches/tt761_keys_revamp/include/parrot/gc_api.h Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/include/parrot/gc_api.h Tue Jul 14 14:47:08 2009 (r40083)
@@ -456,6 +456,9 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/gc/api.c */
+void Parrot_gc_inf_init(PARROT_INTERP);
+
+
/* DEPRECATED. pobject_lives is being renamed to Parrot_gc_mark_PObj_alive.
this macro is provided for compatibility until version 1.4 or later when
it can be removed per the deprecation policy. See TT #664 for details */
@@ -491,6 +494,11 @@
#endif
+#if PARROT_GC_INF
+# define GC_WRITE_BARRIER(interp, agg, old, _new) do { } while (0)
+# define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) do { } while (0)
+#endif
+
#endif /* PARROT_GC_API_H_GUARD */
/*
Modified: branches/tt761_keys_revamp/include/parrot/interpreter.h
==============================================================================
--- branches/tt761_keys_revamp/include/parrot/interpreter.h Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/include/parrot/interpreter.h Tue Jul 14 14:47:08 2009 (r40083)
@@ -314,7 +314,6 @@
int n_vtable_max; /* highest used type */
int n_vtable_alloced; /* alloced vtable space */
- struct _ParrotIOLayer **piolayers; /* IO registered layers */
struct _ParrotIOData *piodata; /* interpreter's IO system */
op_lib_t *op_lib; /* Opcode library */
Modified: branches/tt761_keys_revamp/include/parrot/settings.h
==============================================================================
--- branches/tt761_keys_revamp/include/parrot/settings.h Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/include/parrot/settings.h Tue Jul 14 14:47:08 2009 (r40083)
@@ -39,8 +39,10 @@
* 0 ... MS stop-the-world mark & sweep
* 1 ... IMS incremental mark & sweep
* 2 ... GMS generational mark & sweep
+ * 3 ... INF infinite memory "collector"
*
- * Please note that only 0 currently works.
+ * Please note that only 0 and 3 currently work (and INF doesn't really
+ * "work").
*/
#define PARROT_GC_SUBSYSTEM 0
@@ -49,16 +51,25 @@
# define PARROT_GC_MS 1
# define PARROT_GC_IMS 0
# define PARROT_GC_GMS 0
+# define PARROT_GC_INF 0
#endif
#if PARROT_GC_SUBSYSTEM == 1
# define PARROT_GC_MS 0
# define PARROT_GC_IMS 1
# define PARROT_GC_GMS 0
+# define PARROT_GC_INF 0
#endif
#if PARROT_GC_SUBSYSTEM == 2
# define PARROT_GC_MS 0
# define PARROT_GC_IMS 0
# define PARROT_GC_GMS 1
+# define PARROT_GC_INF 0
+#endif
+#if PARROT_GC_SUBSYSTEM == 3
+# define PARROT_GC_MS 0
+# define PARROT_GC_IMS 0
+# define PARROT_GC_GMS 0
+# define PARROT_GC_INF 1
#endif
/*
Modified: branches/tt761_keys_revamp/lib/Parrot/OpsFile.pm
==============================================================================
--- branches/tt761_keys_revamp/lib/Parrot/OpsFile.pm Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/lib/Parrot/OpsFile.pm Tue Jul 14 14:47:08 2009 (r40083)
@@ -518,8 +518,8 @@
#
# HALT() {{=0}} PC' = 0 Halts run_ops loop, no resume
#
- # restart OFFSET(X) {{=0,+=X}} PC' = 0 Restarts at PC + X
- # restart NEXT() {{=0,+=S}} PC' = 0 Restarts at PC + S
+ # restart OFFSET(X) {{=0,+=X}} PC' = 0 Restarts at PC + X
+ # restart NEXT() {{=0,+=S}} PC' = 0 Restarts at PC + S
#
# $X {{@X}} Argument X $0 is opcode, $1 is first arg
#
@@ -540,6 +540,7 @@
$absolute ||= $body =~ s/\bgoto\s+ADDRESS\((.*?)\)/{{=$1}}/mg;
$body =~ s/\bexpr\s+ADDRESS\((.*?)\)/{{^$1}}/mg;
+ $branch ||= $short_name =~ /runinterp/;
$branch ||= $body =~ s/\bgoto\s+OFFSET\(\( (.*?) \)\)/{{+=$1}}/mg;
$body =~ s/\bexpr\s+OFFSET\(\( (.*?) \)\)/{{^+$1}}/mg;
$branch ||= $body =~ s/\bgoto\s+OFFSET\((.*?)\)/{{+=$1}}/mg;
@@ -548,15 +549,13 @@
$pop ||= $body =~ s/\bgoto\s+POP\(\)/{{=*}}/mg;
$body =~ s/\bexpr\s+POP\(\)/{{^*}}/mg;
+ $next ||= $short_name =~ /runinterp/;
$next ||= $body =~ s/\bexpr\s+NEXT\(\)/{{^+$op_size}}/mg;
$body =~ s/\bgoto\s+NEXT\(\)/{{+=$op_size}}/mg;
$body =~ s/\bHALT\(\)/{{=0}}/mg;
$body =~ s/\bOP_SIZE\b/{{^$op_size}}/mg;
- $branch ||= $short_name =~ /runinterp/;
- $next ||= $short_name =~ /runinterp/;
-
if ( $body =~ s/\brestart\s+OFFSET\((.*?)\)/{{=0,+=$1}}/mg ) {
$branch = 1;
$restart = 1;
@@ -588,17 +587,18 @@
$op->body( $nolines ? $body : qq{#line $line "$file_escaped"\n$body} );
# Constants here are defined in include/parrot/op.h
- or_flag( \$jumps, "PARROT_JUMP_RELATIVE" ) if $branch;
or_flag( \$jumps, "PARROT_JUMP_ADDRESS" ) if $absolute;
+ or_flag( \$jumps, "PARROT_JUMP_RELATIVE" ) if $branch;
or_flag( \$jumps, "PARROT_JUMP_POP" ) if $pop;
or_flag( \$jumps, "PARROT_JUMP_ENEXT" ) if $next;
+ or_flag( \$jumps, "PARROT_JUMP_RESTART" ) if $restart;
# I'm assuming the op branches to the value in the last argument.
- or_flag( \$jumps, "PARROT_JUMP_GNEXT" )
- if ( ($jumps)
+ if ( ($jumps)
&& ( $fixedargs[ @fixedargs - 1 ] )
- && ( $fixedargs[ @fixedargs - 1 ] eq 'i' ) );
- or_flag( \$jumps, "PARROT_JUMP_RESTART" ) if ($restart);
+ && ( $fixedargs[ @fixedargs - 1 ] eq 'i' ) ) {
+ or_flag( \$jumps, "PARROT_JUMP_GNEXT" );
+ }
$op->jump($jumps);
$self->push_op($op);
Modified: branches/tt761_keys_revamp/src/gc/alloc_resources.c
==============================================================================
--- branches/tt761_keys_revamp/src/gc/alloc_resources.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/gc/alloc_resources.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -199,7 +199,7 @@
if (!interp->arena_base->gc_mark_block_level
&& interp->arena_base->mem_allocs_since_last_collect) {
Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
-#if !PARROT_GC_IMS
+#if !PARROT_GC_IMS && !PARROT_GC_INF
/* Compact the pool if allowed and worthwhile */
if (pool->compact) {
/* don't bother reclaiming if it's just chicken feed */
Modified: branches/tt761_keys_revamp/src/gc/api.c
==============================================================================
--- branches/tt761_keys_revamp/src/gc/api.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/gc/api.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -276,6 +276,9 @@
#if PARROT_GC_GMS
Parrot_gc_gms_init(interp);
#endif
+#if PARROT_GC_INF
+ Parrot_gc_inf_init(interp);
+#endif
initialize_memory_pools(interp);
initialize_header_pools(interp);
Added: branches/tt761_keys_revamp/src/gc/gc_inf.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/tt761_keys_revamp/src/gc/gc_inf.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -0,0 +1,284 @@
+/*
+Copyright (C) 2001-2009, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/gc/gc_inf.c - A demonstration of an infinite memory garbage collector
+
+=head1 DESCRIPTION
+
+This code implements an example of a bare-bones "infinite memory" garbage
+collector. This is a learning tool only to demonstrate how to implement the
+GC API in a new core. DO NOT USE THIS CORE ANYWHERE FOR ANY REASON.
+
+Because this core never frees memory, some functionality is missing and some
+tests will fail: Tests for timely destruction, tests involving IO that is
+not manually flushed (the GC never calls the destroy VTABLE, so things never
+get flushed/closed automatically), etc. This is by design and should not be
+considered a "bug" or an "error". It is just a fact of life for such a
+minimalist core.
+
+To enable this core, change the settings in include/parrot/settings.h. Set
+
+ PARROT_GC_SUBSYSEM == 3
+
+to activate this core.
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+#include "gc_private.h"
+
+/* HEADERIZER HFILE: src/gc/gc_private.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void gc_inf_add_free_object(SHIM_INTERP,
+ ARGMOD(Small_Object_Pool *pool),
+ ARGIN(void *to_add))
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*pool);
+
+static void gc_inf_alloc_objects(SHIM_INTERP,
+ ARGMOD(Small_Object_Pool *pool))
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pool);
+
+PARROT_CANNOT_RETURN_NULL
+static void * gc_inf_get_free_object(SHIM_INTERP,
+ ARGMOD(Small_Object_Pool *pool))
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pool);
+
+static void gc_inf_mark_and_sweep(SHIM_INTERP, UINTVAL flags);
+static void gc_inf_more_traceable_objects(SHIM_INTERP,
+ ARGMOD(Small_Object_Pool *pool))
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pool);
+
+static void gc_inf_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pool);
+
+#define ASSERT_ARGS_gc_inf_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(pool) \
+ || PARROT_ASSERT_ARG(to_add)
+#define ASSERT_ARGS_gc_inf_alloc_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(pool)
+#define ASSERT_ARGS_gc_inf_get_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(pool)
+#define ASSERT_ARGS_gc_inf_mark_and_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
+#define ASSERT_ARGS_gc_inf_more_traceable_objects __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(pool)
+#define ASSERT_ARGS_gc_inf_pool_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(pool)
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
+/*
+
+=head1 Functions
+
+=over 4
+
+=item C<static void gc_inf_mark_and_sweep(PARROT_INTERP, UINTVAL flags)>
+
+This function would perform a GC run, if we needed to. Luckily we have
+infinite memory!
+
+This function is called from the GC API function C<Parrot_gc_mark_and_sweep>.
+
+Flags can be a combination of these values:
+
+ GC_finish_FLAG
+ GC_lazy_FLAG
+ GC_trace_stack_FLAG
+
+=cut
+
+*/
+
+static void
+gc_inf_mark_and_sweep(SHIM_INTERP, UINTVAL flags)
+{
+ ASSERT_ARGS(gc_inf_mark_and_sweep)
+ UNUSED(flags);
+}
+
+/*
+
+=item C<static void gc_inf_add_free_object(PARROT_INTERP, Small_Object_Pool
+*pool, void *to_add)>
+
+Manually frees a chunk of memory. Normally this would return the memory
+to the free list of the pool, but in this case we just return it to the
+OS.
+
+This function is called from places like C<Parrot_gc_free_pmc_header> and
+related manual freeing functions. Some cores will also use it internally to
+add items to the freelist from a freshly allocated arena.
+
+=cut
+
+*/
+
+static void
+gc_inf_add_free_object(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool),
+ ARGIN(void *to_add))
+{
+ ASSERT_ARGS(gc_inf_add_free_object)
+ if (to_add)
+ free(to_add);
+}
+
+/*
+
+=item C<static void * gc_inf_get_free_object(PARROT_INTERP, Small_Object_Pool
+*pool)>
+
+Gets a new object from the pool. Each pool specifies an object size in
+C<pool->object_size> so we can use that number to make the allocation. For
+GCs that manage their own memory through the use of arenas or similar
+structures, we can use this basic algorithm here:
+
+ 1) Check if we have any items on the free list and allocate one from there
+ if so.
+ 2) Do a GC run to try and free up new items, and allocate a newly freed
+ item if one becomes available
+ 3) Allocate a new arena from the OS and allocate a new item from there.
+
+This function is called from GC API functions like
+C<Parrot_Gc_get_new_pmc_header>
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static void *
+gc_inf_get_free_object(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+{
+ ASSERT_ARGS(gc_inf_get_free_object)
+ return calloc(pool->object_size, 1);
+}
+
+/*
+
+=item C<static void gc_inf_alloc_objects(PARROT_INTERP, Small_Object_Pool
+*pool)>
+
+Allocates a new arena of objects from the system. This function is only
+really used internally by the core, the API functions don't need to call
+it directly. However, this function is necessary because we may have
+different behaviors for certain pools, so we can't allocate for all of them
+in the same way. We will need to have a new "alloc_objects" function
+for each special case pool.
+
+=cut
+
+*/
+
+static void
+gc_inf_alloc_objects(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+{
+ ASSERT_ARGS(gc_inf_alloc_objects)
+ UNUSED(pool);
+}
+
+/*
+
+=item C<static void gc_inf_more_traceable_objects(PARROT_INTERP,
+Small_Object_Pool *pool)>
+
+Would normally try to find new traceable objects by first running a GC sweep
+and then allocating a new arena from the system. Neither of these are
+necessary in the infinite memory collector.
+
+This function is only used internally to the core, and is not called directly
+from the GC API. Different pools may have special requirements so multiple
+"more_traceable_objects" functions may need to be written and used.
+
+=cut
+
+*/
+
+static void
+gc_inf_more_traceable_objects(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+{
+ ASSERT_ARGS(gc_inf_more_traceable_objects)
+ UNUSED(pool);
+}
+
+/*
+
+=item C<static void gc_inf_pool_init(PARROT_INTERP, Small_Object_Pool *pool)>
+
+Initializes the function pointers in a new pool. When a new pool is created
+we assign several function pointers to it for managing memory in the pool.
+In this way we can treat different pools differently if they have special
+management needs. In general all PObj-like pools are treated one way, and
+other pools (such as the pmc_ext pool) are treated differently.
+
+This function is mostly called from the function C<initialize_header_pools>
+in F<src/gc/mark_sweep.c> at Parrot startup.
+
+=cut
+
+*/
+
+static void
+gc_inf_pool_init(SHIM_INTERP, ARGMOD(Small_Object_Pool *pool))
+{
+ ASSERT_ARGS(gc_inf_pool_init)
+ pool->add_free_object = gc_inf_add_free_object;
+ pool->get_free_object = gc_inf_get_free_object;
+ pool->alloc_objects = gc_inf_alloc_objects;
+ pool->more_objects = gc_inf_more_traceable_objects;
+}
+
+/*
+
+=item C<void Parrot_gc_inf_init(PARROT_INTERP)>
+
+Initializes the infinite memory collector. Installs the necessary function
+pointers into the Arenas structure. The two most important are the
+C<mark_and_sweep> and C<pool_init> functions. C<finalize_gc_system> function
+will be called at Parrot exit and will shut down the GC system if things
+need to be flushed/closed/deactivated/freed/etc. It can be set to NULL if no
+finalization is necessary.
+
+=cut
+
+*/
+
+void
+Parrot_gc_inf_init(PARROT_INTERP)
+{
+ ASSERT_ARGS(Parrot_gc_inf_init)
+ Arenas * const arena_base = interp->arena_base;
+
+ arena_base->do_gc_mark = gc_inf_mark_and_sweep;
+ arena_base->finalize_gc_system = NULL;
+ arena_base->init_pool = gc_inf_pool_init;
+}
+
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: branches/tt761_keys_revamp/src/gc/gc_private.h
==============================================================================
--- branches/tt761_keys_revamp/src/gc/gc_private.h Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/gc/gc_private.h Tue Jul 14 14:47:08 2009 (r40083)
@@ -602,8 +602,21 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/gc/gc_ms.c */
+/* HEADERIZER BEGIN: src/gc/gc_inf.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+void Parrot_gc_inf_init(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_Parrot_gc_inf_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp)
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/gc/gc_inf.c */
+
#endif /* PARROT_GC_PRIVATE_H_GUARD */
+
+
/*
* Local variables:
* c-file-style: "parrot"
Modified: branches/tt761_keys_revamp/src/gc/mark_sweep.c
==============================================================================
--- branches/tt761_keys_revamp/src/gc/mark_sweep.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/gc/mark_sweep.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -1082,6 +1082,8 @@
* Use GS MS pool functions
*/
gc_ms_pmc_ext_pool_init(arena_base->pmc_ext_pool);
+#elif PARROT_GC_INF
+ arena_base->init_pool(interp, arena_base->pmc_ext_pool);
#else
/* rational, consistant behavior (as yet unwritten) */
#endif
Modified: branches/tt761_keys_revamp/src/hash.c
==============================================================================
--- branches/tt761_keys_revamp/src/hash.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/hash.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -1301,6 +1301,20 @@
const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed);
HashBucket *bucket = hash->bi[hashval & hash->mask];
+ /* Very complex assert that we'll not put non-constant stuff into constant hash */
+ PARROT_ASSERT(
+ PMC_IS_NULL(hash->container)
+ || !(PObj_constant_TEST(hash->container))
+ || (
+ !(hash->key_type == Hash_key_type_STRING)
+ || PObj_constant_TEST((PObj *)key))
+ && (
+ !((hash->entry_type == enum_type_PMC) || (hash->entry_type == enum_type_STRING))
+ || PObj_constant_TEST((PObj *)value)
+ )
+ || !"Use non-constant key or value in constant hash"
+ );
+
while (bucket) {
/* store hash_val or not */
if ((hash->compare)(interp, key, bucket->key) == 0)
Modified: branches/tt761_keys_revamp/src/hll.c
==============================================================================
--- branches/tt761_keys_revamp/src/hll.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/hll.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -87,11 +87,6 @@
PMC *entry_id;
- /*
- * ATT: all items that are owned by the HLL_info structure
- * have to be created as constant objects, because
- * this structure isn't marked by GC
- */
PMC * const entry = constant_pmc_new(interp, enum_class_FixedPMCArray);
if (entry_name && !STRING_IS_EMPTY(entry_name)) {
@@ -133,7 +128,7 @@
{
ASSERT_ARGS(Parrot_init_HLL)
interp->HLL_info =
- constant_pmc_new(interp, enum_class_OrderedHash);
+ pmc_new(interp, enum_class_OrderedHash);
interp->HLL_namespace =
constant_pmc_new(interp, enum_class_ResizablePMCArray);
Modified: branches/tt761_keys_revamp/src/pmc/class.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/class.pmc Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/pmc/class.pmc Tue Jul 14 14:47:08 2009 (r40083)
@@ -496,7 +496,7 @@
_class->resolve_method = pmc_new(interp, enum_class_ResizablePMCArray);
_class->vtable_overrides = pmc_new(interp, enum_class_Hash);
- _class->parent_overrides = constant_pmc_new(interp, enum_class_Hash);
+ _class->parent_overrides = pmc_new(interp, enum_class_Hash);
/* We put ourself on the all parents list. */
VTABLE_push_pmc(interp, _class->all_parents, SELF);
Modified: branches/tt761_keys_revamp/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/tt761_keys_revamp/src/pmc/pmcproxy.pmc Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/pmc/pmcproxy.pmc Tue Jul 14 14:47:08 2009 (r40083)
@@ -95,7 +95,7 @@
_pmc->roles = pmc_new(interp, enum_class_ResizablePMCArray);
_pmc->methods = pmc_new(interp, enum_class_Hash);
_pmc->vtable_overrides = pmc_new(interp, enum_class_Hash);
- _pmc->parent_overrides = constant_pmc_new(interp, enum_class_Hash);
+ _pmc->parent_overrides = pmc_new(interp, enum_class_Hash);
_pmc->attrib_metadata = pmc_new(interp, enum_class_Hash);
_pmc->attrib_index = PMCNULL;
_pmc->attrib_cache = PMCNULL;
Modified: branches/tt761_keys_revamp/src/pmc_freeze.c
==============================================================================
--- branches/tt761_keys_revamp/src/pmc_freeze.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/pmc_freeze.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -1661,6 +1661,11 @@
PARROT_ASSERT(current->vtable);
+ /* Workaround for thawing constants. Clear constant flag */
+ /* See src/packfile.c:3999 */
+ if (thawing)
+ PObj_constant_CLEAR(current);
+
VTABLE_visit(interp, current, info);
if (thawing) {
Modified: branches/tt761_keys_revamp/src/thread.c
==============================================================================
--- branches/tt761_keys_revamp/src/thread.c Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/src/thread.c Tue Jul 14 14:47:08 2009 (r40083)
@@ -498,7 +498,7 @@
Parrot_runloop jump_point;
int lo_var_ptr;
UINTVAL tid;
- PMC *sub_pmc;
+ PMC * volatile sub_pmc;
PMC *sub_arg;
PMC * const self = (PMC*) arg;
PMC *ret_val = NULL;
Modified: branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_lookarounds
==============================================================================
--- branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_lookarounds Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_lookarounds Tue Jul 14 14:47:08 2009 (r40083)
@@ -28,12 +28,14 @@
<+[a..z]>+ az y metasyntax with leading + (<+...>)
<+alpha>+ az y metasyntax with leading + (<+...>)
-<null> '' y null pattern (<null>)
-^ <null> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<null>: < @ 0>/ null pattern (<null>)
-<null> $ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<null>: < @ 65>/ null pattern (<null>)
-abc <null> def \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<null>)
-x | y | <null> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<null>)
-x | y | <?null> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<null>)
+<?> '' y null pattern (<?>)
+^ <?> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<?>)
+<?> $ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<?>)
+abc <?> def \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<?>)
+x | y | <?> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<?>)
+x | y | <?> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij y null pattern (<?>)
+
+abc <!> def \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij n fail pattern <!>
a[b} \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /rule error/ mismatched close
Modified: branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_subrules
==============================================================================
--- branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_subrules Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/t/compilers/pge/perl6regex/rx_subrules Tue Jul 14 14:47:08 2009 (r40083)
@@ -1,5 +1,4 @@
## builtin subrules
-abc <fail> def \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij n <fail>
<ident> 2+3 ab2 /mob<ident>: <ab2 @ 4>/ capturing builtin <ident>
<name> ab::cd::x3::42 /mob<name>: <ab::cd::x3 @ 0>/ capturing builtin <name>
@@ -50,14 +49,6 @@
<alnum> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<alnum>: <0 @ 35>/ <alnum>
<+alnum> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob: <0 @ 35>/ <+alnum>
<+alnum>+ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob: <0123456789ABCDEFGHIJabcdefghij @ 35>/ <+alnum>+
-<sp> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<sp>: < @ 3>/ <sp>
-<+sp>+ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob: < @ 3>/ <+sp>+
-<lt> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<lt>: << @ 21>/ <lt>
-<+lt>+ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob: << @ 21>/ <+lt>+
-<gt> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<gt>: <> @ 23>/ <gt>
-<+gt>+ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob: <> @ 23>/ <+gt>+
-<dot> \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob<dot>: <. @ 17>/ <dot>
-<+dot>+ \t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij /mob: <. @ 17>/ <+dot>+
<+alnum+[_]> ident_1 y union of character classes
<+[ab]+[\-]>+ aaa-bbb y enumerated character classes
<+ [ a b ]+[\-]>+ aaa-bbb y whitespace is ignored within square brackets and after the initial +
Modified: branches/tt761_keys_revamp/t/pmc/exception.t
==============================================================================
--- branches/tt761_keys_revamp/t/pmc/exception.t Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/t/pmc/exception.t Tue Jul 14 14:47:08 2009 (r40083)
@@ -678,8 +678,6 @@
/No such string attribute/
OUTPUT
-SKIP: {
- skip( "intermittent segfault, RT #60556", 1 );
pir_output_is( <<'CODE', <<'OUTPUT', "catch ex from C-level MULTI function" );
.sub main :main
@@ -715,7 +713,6 @@
CODE
no segfault
OUTPUT
-}
pir_output_is( <<'CODE', <<'OUTPUT', "count_eh" );
.sub main :main
Modified: branches/tt761_keys_revamp/tools/dev/install_files.pl
==============================================================================
--- branches/tt761_keys_revamp/tools/dev/install_files.pl Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/tools/dev/install_files.pl Tue Jul 14 14:47:08 2009 (r40083)
@@ -104,11 +104,17 @@
transform => sub {
my($filehash) = @_;
local($_) = $filehash->{Dest};
- if ( /^install_/ ) {
+ if ( /^install_config\.fpmc/ ) {
s/^install_//; # parrot with different config
$filehash->{DestDirs} = [$parrotdir, 'include'];
$filehash->{Dest} = $_;
}
+ elsif ( /install_config/ ) {
+ s/install_config/parrot_config/;
+ s/^src//; # strip off leading src/ dir
+ $filehash->{DestDirs} = [$parrotdir];
+ $filehash->{Dest} = $_;
+ }
else {
# don't allow libraries to be installed into subdirs of libdir
$filehash->{Dest} = basename($_);
Modified: branches/tt761_keys_revamp/tools/dev/pbc_to_exe.pir
==============================================================================
--- branches/tt761_keys_revamp/tools/dev/pbc_to_exe.pir Tue Jul 14 14:29:28 2009 (r40082)
+++ branches/tt761_keys_revamp/tools/dev/pbc_to_exe.pir Tue Jul 14 14:47:08 2009 (r40083)
@@ -568,6 +568,7 @@
$P0 = '_config'()
.local string cc, link, link_dynamic, linkflags, ld_out, libparrot, libs, o
.local string rpath, osname, build_dir, slash, icushared
+ .local string installed, libdir, versiondir
cc = $P0['cc']
link = $P0['link']
link_dynamic = $P0['link_dynamic']
@@ -581,18 +582,29 @@
build_dir = $P0['build_dir']
slash = $P0['slash']
icushared = $P0['icu_shared']
+ installed = $P0['installed']
+ libdir = $P0['libdir']
+ versiondir = $P0['versiondir']
.local string config, pathquote, exeprefix
+ if installed == '1' goto config_installed
exeprefix = substr exefile, 0, 12
config = concat build_dir, slash
config .= 'src'
config .= slash
- if exeprefix == 'installable_' goto config_install
+ if exeprefix == 'installable_' goto config_to_install
config .= 'parrot_config'
goto config_cont
- config_install:
+ config_to_install:
config .= 'install_config'
rpath = $P0['rpath_lib']
+ goto config_cont
+ config_installed:
+ rpath = $P0['rpath_lib']
+ libparrot = $P0['inst_libparrot_linkflags']
+ config = concat libdir, versiondir
+ config .= slash
+ config .= 'parrot_config'
config_cont:
config .= o
pathquote = ''
More information about the parrot-commits
mailing list