[svn:parrot] r49369 - in branches/string_macros: . compilers/pct/src/PAST compilers/pct/src/POST config/gen/makefiles include/parrot include/parrot/oplib src src/ops src/string t t/op tools/install
nwellnhof at svn.parrot.org
nwellnhof at svn.parrot.org
Tue Sep 28 19:37:08 UTC 2010
Author: nwellnhof
Date: Tue Sep 28 19:37:08 2010
New Revision: 49369
URL: https://trac.parrot.org/parrot/changeset/49369
Log:
Merge trunk
Modified:
branches/string_macros/NEWS
branches/string_macros/compilers/pct/src/PAST/Compiler.pir
branches/string_macros/compilers/pct/src/PAST/Node.pir
branches/string_macros/compilers/pct/src/POST/Compiler.pir
branches/string_macros/compilers/pct/src/POST/Node.pir
branches/string_macros/config/gen/makefiles/root.in
branches/string_macros/include/parrot/oplib/core_ops.h
branches/string_macros/include/parrot/oplib/ops.h
branches/string_macros/include/parrot/opsenum.h
branches/string_macros/src/debug.c
branches/string_macros/src/hash.c
branches/string_macros/src/ops/core_ops.c
branches/string_macros/src/string/api.c
branches/string_macros/t/harness
branches/string_macros/t/op/gc-non-recursive.t
branches/string_macros/tools/install/smoke_languages.pl
Modified: branches/string_macros/NEWS
==============================================================================
--- branches/string_macros/NEWS Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/NEWS Tue Sep 28 19:37:08 2010 (r49369)
@@ -1,7 +1,12 @@
# $Id$
New in 2.9.0
- <already adding news for 2.9.0 would be nice>
+- Core
+ + New default garbage collector
+- Testing
+ + "make smoke" now respects TEST_JOBS
+- GitMigration
+- Compilers
New in 2.8.0
- Core
Modified: branches/string_macros/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/string_macros/compilers/pct/src/PAST/Compiler.pir Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/compilers/pct/src/PAST/Compiler.pir Tue Sep 28 19:37:08 2010 (r49369)
@@ -812,7 +812,7 @@
unshift blockpast, node
.local string name, pirflags, blocktype
- .local pmc nsentry, subid, ns, hll, multi
+ .local pmc nsentry, subid, ns, hll, multi, loadlibs
name = node.'name'()
pirflags = node.'pirflags'()
blocktype = node.'blocktype'()
@@ -821,6 +821,7 @@
ns = node.'namespace'()
hll = node.'hll'()
multi = node.'multi'()
+ loadlibs = node.'loadlibs'()
## handle nsentry attribute
$I0 = defined nsentry
@@ -846,7 +847,7 @@
## create a POST::Sub node for this block
.local pmc bpost
$P0 = get_hll_global ['POST'], 'Sub'
- bpost = $P0.'new'('node'=>node, 'name'=>name, 'blocktype'=>blocktype, 'namespace'=>ns, 'hll'=>hll, 'subid'=>subid, 'multi'=>multi)
+ bpost = $P0.'new'('node'=>node, 'name'=>name, 'blocktype'=>blocktype, 'namespace'=>ns, 'hll'=>hll, 'subid'=>subid, 'multi'=>multi, 'loadlibs'=>loadlibs)
unless pirflags goto pirflags_done
bpost.'pirflags'(pirflags)
pirflags_done:
@@ -2086,7 +2087,7 @@
$S0 = files
sourceline = concat ' (', $S0
concat sourceline, ':'
- $I0 = self.'lineof'(source, pos)
+ $I0 = self.'lineof'(pos)
inc $I0
$S0 = $I0
concat sourceline, $S0
@@ -2390,11 +2391,19 @@
name = node.'name'()
name = self.'escape'(name)
+ # We have three cases here.
+ # 0 children = use self
+ # 1 child = object to look up on
+ # 2 children = object to look up on + class handle
+ # In the last case, we need to generate a different form of the op that
+ # has the extra argument.
.local pmc call_on
+ $I0 = elements node
+ if $I0 == 0 goto use_self
call_on = node[0]
- if null call_on goto use_self
call_on = self.'as_post'(call_on, 'rtype'=>'P')
ops.'push'(call_on)
+ if $I0 == 2 goto have_class_handle
goto invocant_done
use_self:
call_on = box 'self'
@@ -2413,6 +2422,25 @@
ops.'push_pirop'('setattribute', call_on, name, bindpost)
ops.'result'(bindpost)
.return (ops)
+
+ have_class_handle:
+ .local pmc handle
+ handle = node[1]
+ handle = self.'as_post'(handle, 'rtype'=>'P')
+ ops.'push'(handle)
+
+ if bindpost goto attribute_bind_handle
+
+ .local pmc fetchop, storeop
+ $P0 = get_hll_global ['POST'], 'Op'
+ fetchop = $P0.'new'(ops, call_on, handle, name, 'pirop'=>'getattribute')
+ storeop = $P0.'new'(call_on, handle, name, ops, 'pirop'=>'setattribute')
+ .tailcall self.'vivify'(node, ops, fetchop, storeop)
+
+ attribute_bind_handle:
+ ops.'push_pirop'('setattribute', call_on, handle, name, bindpost)
+ ops.'result'(bindpost)
+ .return (ops)
.end
Modified: branches/string_macros/compilers/pct/src/PAST/Node.pir
==============================================================================
--- branches/string_macros/compilers/pct/src/PAST/Node.pir Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/compilers/pct/src/PAST/Node.pir Tue Sep 28 19:37:08 2010 (r49369)
@@ -601,6 +601,21 @@
.end
+=item loadlibs([lib1, lib2, ...])
+
+Get/set the libraries to be loaded at startup. EXPERIMENTAL (not subject to
+deprecation policy, yet).
+
+=cut
+
+.sub 'loadlibs' :method
+ .param pmc libs :slurpy
+ .local int has_value
+ has_value = elements libs
+ .tailcall self.'attr'('loadlibs', libs, has_value)
+.end
+
+
=item nsentry([nsentry])
Get/set the C<nsentry> for this block.
Modified: branches/string_macros/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/string_macros/compilers/pct/src/POST/Compiler.pir Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/compilers/pct/src/POST/Compiler.pir Tue Sep 28 19:37:08 2010 (r49369)
@@ -130,8 +130,9 @@
pos = cpost['pos']
if null pos goto done_subline
source = cpost['source']
- if null source goto done_subline
- line = self.'lineof'(source, pos, 'cache'=>1)
+ $I0 = can source, 'lineof'
+ unless $I0 goto done_subline
+ line = source.'lineof'(pos)
inc line
done_subline:
self.'pir'(cpost)
@@ -362,9 +363,20 @@
goto subpir_done
subpir_post:
- unless hll goto subpir_ns
+ unless hll goto subpir_loadlibs
$P0 = self.'escape'(hll)
subpir.'append_format'("\n.HLL %0\n", $P0)
+ subpir_loadlibs:
+ $P0 = node.'loadlibs'()
+ if null $P0 goto subpir_ns
+ unless $P0 goto subpir_ns
+ $P1 = iter $P0
+ subpir_loadlibs_loop:
+ unless $P1 goto subpir_ns
+ $P2 = shift $P1
+ $P2 = self.'escape'($P2)
+ subpir.'append_format'("\n.loadlib %0\n", $P2)
+ goto subpir_loadlibs_loop
subpir_ns:
subpir.'append_format'("\n.namespace %0\n", nskey)
subpir_directives:
Modified: branches/string_macros/compilers/pct/src/POST/Node.pir
==============================================================================
--- branches/string_macros/compilers/pct/src/POST/Node.pir Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/compilers/pct/src/POST/Node.pir Tue Sep 28 19:37:08 2010 (r49369)
@@ -194,6 +194,13 @@
.end
+.sub 'loadlibs' :method
+ .param pmc value :optional
+ .param int has_value :opt_flag
+ .tailcall self.'attr'('loadlibs', value, has_value)
+.end
+
+
.sub 'outer' :method
.param pmc value :optional
.param int has_value :opt_flag
Modified: branches/string_macros/config/gen/makefiles/root.in
==============================================================================
--- branches/string_macros/config/gen/makefiles/root.in Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/config/gen/makefiles/root.in Tue Sep 28 19:37:08 2010 (r49369)
@@ -1766,7 +1766,8 @@
t/pmc/testlib/annotations.pbc \
t/pmc/testlib/number.pbc
-# pbc files used for several tests
+# pbc files used for several tests;
+# not needed for build, hence this target is not included in 'all'
pbctestfiles: $(PARROT) $(PBC_TEST_FILES)
t/pmc/testlib/number.pbc: t/pmc/testlib/number.pasm
Modified: branches/string_macros/include/parrot/oplib/core_ops.h
==============================================================================
--- branches/string_macros/include/parrot/oplib/core_ops.h Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/include/parrot/oplib/core_ops.h Tue Sep 28 19:37:08 2010 (r49369)
@@ -12,7 +12,7 @@
* .ops files). by ops2c.nqp.
*
* Any changes made here will be lost! To regenerate this file after making
- * changes to any ops, use the bootstap-ops makefile target.
+ * changes to any ops, use the bootstrap-ops makefile target.
*
*/
Modified: branches/string_macros/include/parrot/oplib/ops.h
==============================================================================
--- branches/string_macros/include/parrot/oplib/ops.h Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/include/parrot/oplib/ops.h Tue Sep 28 19:37:08 2010 (r49369)
@@ -12,7 +12,7 @@
* .ops files). by ops2c.nqp.
*
* Any changes made here will be lost! To regenerate this file after making
- * changes to any ops, use the bootstap-ops makefile target.
+ * changes to any ops, use the bootstrap-ops makefile target.
*
*/
Modified: branches/string_macros/include/parrot/opsenum.h
==============================================================================
--- branches/string_macros/include/parrot/opsenum.h Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/include/parrot/opsenum.h Tue Sep 28 19:37:08 2010 (r49369)
@@ -12,7 +12,7 @@
* .ops files). by ops2c.nqp.
*
* Any changes made here will be lost! To regenerate this file after making
- * changes to any ops, use the bootstap-ops makefile target.
+ * changes to any ops, use the bootstrap-ops makefile target.
*
*/
enum OPS_ENUM {
Modified: branches/string_macros/src/debug.c
==============================================================================
--- branches/string_macros/src/debug.c Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/src/debug.c Tue Sep 28 19:37:08 2010 (r49369)
@@ -1489,7 +1489,6 @@
PDB_breakpoint_t *newbreak,
*oldbreak;
PDB_line_t *line = NULL;
- long bp_id;
opcode_t *breakpos = NULL;
unsigned long ln = get_ulong(& command, 0);
@@ -1796,10 +1795,8 @@
PDB_delete_breakpoint(PARROT_INTERP, ARGIN(const char *command))
{
ASSERT_ARGS(PDB_delete_breakpoint)
- PDB_t *pdb = interp->pdb;
+ PDB_t * const pdb = interp->pdb;
PDB_breakpoint_t * const breakpoint = PDB_find_breakpoint(interp, command);
- const PDB_line_t *line;
- long bp_id;
if (breakpoint) {
display_breakpoint(pdb, breakpoint);
Modified: branches/string_macros/src/hash.c
==============================================================================
--- branches/string_macros/src/hash.c Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/src/hash.c Tue Sep 28 19:37:08 2010 (r49369)
@@ -799,7 +799,6 @@
const Hash_key_type key_type = hash->key_type;
const PARROT_DATA_TYPE entry_type = hash->entry_type;
const size_t entries = hash->entries;
- size_t i;
VTABLE_push_integer(interp, info, entries);
VTABLE_push_integer(interp, info, key_type);
Modified: branches/string_macros/src/ops/core_ops.c
==============================================================================
--- branches/string_macros/src/ops/core_ops.c Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/src/ops/core_ops.c Tue Sep 28 19:37:08 2010 (r49369)
@@ -6,7 +6,7 @@
* .ops files). by ops2c.nqp.
*
* Any changes made here will be lost! To regenerate this file after making
- * changes to any ops, use the bootstap-ops makefile target.
+ * changes to any ops, use the bootstrap-ops makefile target.
*
*/
Modified: branches/string_macros/src/string/api.c
==============================================================================
--- branches/string_macros/src/string/api.c Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/src/string/api.c Tue Sep 28 19:37:08 2010 (r49369)
@@ -3122,7 +3122,6 @@
do {
String_iter start, end;
- INTVAL pos;
start = iter;
if (Parrot_str_iter_index(interp, str, &start, &end, delim) < 0)
Modified: branches/string_macros/t/harness
==============================================================================
--- branches/string_macros/t/harness Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/t/harness Tue Sep 28 19:37:08 2010 (r49369)
@@ -82,6 +82,7 @@
merge => 1,
extra_properties => \%env_data,
extra_files => [ 'myconfig', 'config_lib.pir' ],
+ jobs => $ENV{TEST_JOBS} || 1,
}
);
$harness->runtests(@tests);
Modified: branches/string_macros/t/op/gc-non-recursive.t
==============================================================================
--- branches/string_macros/t/op/gc-non-recursive.t Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/t/op/gc-non-recursive.t Tue Sep 28 19:37:08 2010 (r49369)
@@ -37,7 +37,7 @@
($I0, next) = next.'reify'()
if $I1 < 10000000 goto loop
sweep 1
- ok(1, "Marking of large list doesn't exaust C stack")
+ ok(1, "Marking of large list doesn't exhaust C stack")
done_testing()
.end
Modified: branches/string_macros/tools/install/smoke_languages.pl
==============================================================================
--- branches/string_macros/tools/install/smoke_languages.pl Tue Sep 28 19:36:01 2010 (r49368)
+++ branches/string_macros/tools/install/smoke_languages.pl Tue Sep 28 19:37:08 2010 (r49369)
@@ -323,6 +323,8 @@
SKIP:
{
+delete $ENV{LUA_INIT};
+delete $ENV{LUA_PATH};
$exe = quote(catfile($pwd, $bindir, 'parrot-lua'));
skip("Lua", 1) unless (-d "$pwd/$langdir/lua" || -e $exe);
chdir("$pwd/$langdir/lua");
More information about the parrot-commits
mailing list