[svn:parrot] r48669 - in branches/html_cleanup: . include/parrot src src/interp src/pmc src/runcore t/pmc t/src tools/dev
mikehh at svn.parrot.org
mikehh at svn.parrot.org
Thu Aug 26 15:03:10 UTC 2010
Author: mikehh
Date: Thu Aug 26 15:03:10 2010
New Revision: 48669
URL: https://trac.parrot.org/parrot/changeset/48669
Log:
[html_cleanup] merge in latest trunk changes to the branch
Modified:
branches/html_cleanup/ (props changed)
branches/html_cleanup/include/parrot/runcore_trace.h (props changed)
branches/html_cleanup/src/interp/inter_create.c (props changed)
branches/html_cleanup/src/pmc.c
branches/html_cleanup/src/pmc/stringbuilder.pmc
branches/html_cleanup/src/runcore/cores.c (contents, props changed)
branches/html_cleanup/src/runcore/trace.c (contents, props changed)
branches/html_cleanup/t/pmc/exception.t
branches/html_cleanup/t/src/embed.t (props changed)
branches/html_cleanup/tools/dev/mk_gitignore.pl (props changed)
Modified: branches/html_cleanup/src/pmc.c
==============================================================================
--- branches/html_cleanup/src/pmc.c Thu Aug 26 13:10:45 2010 (r48668)
+++ branches/html_cleanup/src/pmc.c Thu Aug 26 15:03:10 2010 (r48669)
@@ -127,7 +127,7 @@
#ifndef NDEBUG
- pmc->vtable = (VTABLE *)0xdeadbeef;
+ pmc->data = (DPOINTER *)0xdeadbeef;
#endif
Modified: branches/html_cleanup/src/pmc/stringbuilder.pmc
==============================================================================
--- branches/html_cleanup/src/pmc/stringbuilder.pmc Thu Aug 26 13:10:45 2010 (r48668)
+++ branches/html_cleanup/src/pmc/stringbuilder.pmc Thu Aug 26 15:03:10 2010 (r48669)
@@ -353,16 +353,13 @@
}
else if (Parrot_str_equal(INTERP, key, comma)) {
INTVAL num_args = VTABLE_elements(INTERP, args);
- INTVAL pos_args = 1;
+ INTVAL pos_args;
- VTABLE_push_string(INTERP, stringbuilder,
- VTABLE_get_string_keyed_int(INTERP, args, 0));
-
- while (pos_args < num_args) {
- VTABLE_push_string(INTERP, stringbuilder, comma_space);
+ for (pos_args = 0; pos_args < num_args; ++pos_args) {
+ if (pos_args > 0)
+ VTABLE_push_string(INTERP, stringbuilder, comma_space);
VTABLE_push_string(INTERP, stringbuilder,
VTABLE_get_string_keyed_int(INTERP, args, pos_args));
- pos_args++;
}
}
else if (Parrot_str_equal(INTERP, key, percent)) {
Modified: branches/html_cleanup/src/runcore/cores.c
==============================================================================
--- branches/html_cleanup/src/runcore/cores.c Thu Aug 26 13:10:45 2010 (r48668)
+++ branches/html_cleanup/src/runcore/cores.c Thu Aug 26 15:03:10 2010 (r48669)
@@ -675,7 +675,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"attempt to access code outside of current code segment");
- Parrot_gc_mark_and_sweep(interp, GC_TRACE_FULL);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), pc);
DO_OP(pc, interp);
@@ -717,7 +717,7 @@
"attempt to access code outside of current code segment");
if (interp->pdb->state & PDB_GCDEBUG)
- Parrot_gc_mark_and_sweep(interp, 0);
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
if (interp->pdb->state & PDB_TRACING) {
trace_op(interp,
Modified: branches/html_cleanup/src/runcore/trace.c
==============================================================================
--- branches/html_cleanup/src/runcore/trace.c Thu Aug 26 13:10:45 2010 (r48668)
+++ branches/html_cleanup/src/runcore/trace.c Thu Aug 26 15:03:10 2010 (r48669)
@@ -127,15 +127,15 @@
return;
}
- if (!pmc->vtable || (UINTVAL)pmc->vtable == 0xdeadbeef) {
- Parrot_io_eprintf(debugger, "<!!no vtable!!>");
- return;
- }
-
if (PObj_on_free_list_TEST(pmc))
Parrot_io_eprintf(debugger,
"**************** PMC is on free list *****\n");
+ if (!pmc->vtable) {
+ Parrot_io_eprintf(debugger, "<!!no vtable!!>");
+ return;
+ }
+
if (pmc->vtable->pmc_class == pmc) {
STRING * const name = trace_class_name(interp, pmc);
Parrot_io_eprintf(debugger, "Class=%Ss:PMC(%#p)", name, pmc);
Modified: branches/html_cleanup/t/pmc/exception.t
==============================================================================
--- branches/html_cleanup/t/pmc/exception.t Thu Aug 26 13:10:45 2010 (r48668)
+++ branches/html_cleanup/t/pmc/exception.t Thu Aug 26 15:03:10 2010 (r48669)
@@ -20,9 +20,10 @@
.sub main :main
.include 'test_more.pir'
- plan(23)
+ plan(27)
test_bool()
test_int()
+ test_get_integer_keyed()
test_attrs()
test_attributes()
test_push_pop_eh()
@@ -45,6 +46,30 @@
is($I0, 42, 'set/get integer on Exception')
.end
+.sub test_get_integer_keyed
+ .local pmc ex, eh
+ .local int value
+ ex = new ['Exception']
+ value = ex['type']
+ is(value, 0, 'get type default value')
+ value = ex['exit_code']
+ is(value, 0, 'get exit_code default value')
+ value = ex['handled']
+ is(value, 0, 'get handled default is false')
+
+ eh = new ['ExceptionHandler']
+ eh.'handle_types'(.EXCEPTION_ATTRIB_NOT_FOUND)
+ set_label eh, catch
+ push_eh eh
+ value = 1
+ value = ex['the droids you are looking for']
+ value = 0
+ catch:
+ finalize eh
+ pop_eh
+ is(value, 1, 'invalid key throws')
+.end
+
.sub test_attrs
$P0 = new 'ExceptionHandler'
set_addr $P0, _handler
More information about the parrot-commits
mailing list