[svn:parrot] r36643 - in trunk: compilers/imcc docs/project ext/Parrot-Embed/t src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Feb 12 21:01:24 UTC 2009


Author: chromatic
Date: Thu Feb 12 21:01:23 2009
New Revision: 36643
URL: https://trac.parrot.org/parrot/changeset/36643

Log:
[misc] Tidied some code; no functional changes.  Yes, it's all over the place.

Modified:
   trunk/compilers/imcc/pbc.c
   trunk/docs/project/ticket_wrangler_guide.pod
   trunk/ext/Parrot-Embed/t/interp.t
   trunk/ext/Parrot-Embed/t/languages.t
   trunk/src/global.c
   trunk/src/packfile.c

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c	Thu Feb 12 20:58:45 2009	(r36642)
+++ trunk/compilers/imcc/pbc.c	Thu Feb 12 21:01:23 2009	(r36643)
@@ -1465,7 +1465,6 @@
     else
         sub->ns_entry_name = sub->name;
 
-
     Parrot_store_sub_in_namespace(interp, sub_pmc);
 
     pfc->type     = PFC_PMC;

Modified: trunk/docs/project/ticket_wrangler_guide.pod
==============================================================================
--- trunk/docs/project/ticket_wrangler_guide.pod	Thu Feb 12 20:58:45 2009	(r36642)
+++ trunk/docs/project/ticket_wrangler_guide.pod	Thu Feb 12 21:01:23 2009	(r36643)
@@ -326,4 +326,3 @@
 Joshua Hoblitt (JHOBLITT) C<jhoblitt at cpan.org>
 
 =cut
-

Modified: trunk/ext/Parrot-Embed/t/interp.t
==============================================================================
--- trunk/ext/Parrot-Embed/t/interp.t	Thu Feb 12 20:58:45 2009	(r36642)
+++ trunk/ext/Parrot-Embed/t/interp.t	Thu Feb 12 21:01:23 2009	(r36643)
@@ -1,6 +1,6 @@
 #!perl
 
-# Copyright (C) 2006-2008, The Perl Foundation.
+# Copyright (C) 2006-2009, The Perl Foundation.
 # $Id$
 
 use strict;

Modified: trunk/ext/Parrot-Embed/t/languages.t
==============================================================================
--- trunk/ext/Parrot-Embed/t/languages.t	Thu Feb 12 20:58:45 2009	(r36642)
+++ trunk/ext/Parrot-Embed/t/languages.t	Thu Feb 12 21:01:23 2009	(r36643)
@@ -23,19 +23,15 @@
 
 my $result = eval { $interp->load_file($abc_pbc) };
 my $except = $@;
-ok( $result, '... returning true if it could load the file' );
-is( $except, '', '... throwing no exeption if so' );
+ok( $result,     '... returning true if it could load the file' );
+is( $except, '', '... throwing no exception if so' );
 
 my $abc = $interp->find_global( 'main', 'abc::Compiler' );
 isa_ok( $abc, 'Parrot::PMC' );
 
-SKIP: {
-    skip( 'Cannot find namespaced names yet', 2 );
-
-    my $pmc  = $abc->invoke('PS', '2+3');
-    ok( $pmc, 'invoke() should return a PMC, given that signature' );
-    is( $pmc->get_string(), 1, 'value returned in the PMC' );
-}
+my $pmc  = $abc->invoke('PS', '2+3');
+ok( $pmc, 'invoke() should return a PMC, given that signature' );
+is( $pmc->get_string(), 1, 'value returned in the PMC' );
 
 # Local Variables:
 #   mode: cperl

Modified: trunk/src/global.c
==============================================================================
--- trunk/src/global.c	Thu Feb 12 20:58:45 2009	(r36642)
+++ trunk/src/global.c	Thu Feb 12 21:01:23 2009	(r36643)
@@ -836,8 +836,10 @@
     const INTVAL cur_id = CONTEXT(interp)->current_HLL;
 
     PMC *ns;
+
     /* PF structures aren't fully constructed yet */
     Parrot_block_GC_mark(interp);
+
     /* store relative to HLL namespace */
     CONTEXT(interp)->current_HLL = PMC_sub(sub)->HLL_id;
 
@@ -849,6 +851,7 @@
     /* store a :multi sub */
     if (!PMC_IS_NULL(PMC_sub(sub)->multi_signature))
         store_sub_in_multi(interp, sub, ns);
+
     /* store other subs (as long as they're not :anon) */
     else if (!(PObj_get_FLAGS(sub) & SUB_FLAG_PF_ANON)) {
         STRING * const ns_entry_name = PMC_sub(sub)->ns_entry_name;

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Thu Feb 12 20:58:45 2009	(r36642)
+++ trunk/src/packfile.c	Thu Feb 12 21:01:23 2009	(r36643)
@@ -4448,10 +4448,13 @@
 {
     ASSERT_ARGS(PackFile_append_pbc)
     PackFile * const pf = Parrot_readbc(interp, filename);
+
     if (!pf)
         return NULL;
+
     PackFile_add_segment(interp, &interp->initial_pf->directory,
             &pf->directory.base);
+
     do_sub_pragmas(interp, pf->cur_cs, PBC_LOADED, NULL);
     return pf;
 }
@@ -4488,12 +4491,16 @@
             "\"load_bytecode\" no file name");
 
     parrot_split_path_ext(interp, file_str, &wo_ext, &ext);
+
     /* check if wo_ext is loaded */
     is_loaded_hash = VTABLE_get_pmc_keyed_int(interp,
         interp->iglobals, IGLOBALS_PBC_LIBS);
+
     if (VTABLE_exists_keyed_str(interp, is_loaded_hash, wo_ext))
         return;
+
     pbc = CONST_STRING(interp, "pbc");
+
     if (Parrot_str_not_equal(interp, ext, pbc) == 0)
         file_type = PARROT_RUNTIME_FT_PBC;
     else
@@ -4505,9 +4512,10 @@
             "\"load_bytecode\" couldn't find file '%Ss'", file_str);
 
     /* remember wo_ext => full_path mapping */
-    VTABLE_set_string_keyed_str(interp, is_loaded_hash,
-            wo_ext, path);
+    VTABLE_set_string_keyed_str(interp, is_loaded_hash, wo_ext, path);
+
     filename = Parrot_str_to_cstring(interp, path);
+
     if (file_type == PARROT_RUNTIME_FT_PBC) {
         PackFile *pf = PackFile_append_pbc(interp, filename);
         Parrot_str_free_cstring(filename);
@@ -4519,8 +4527,7 @@
     else {
         STRING *err;
         PackFile_ByteCode * const cs =
-            (PackFile_ByteCode *)IMCC_compile_file_s(interp,
-                filename, &err);
+            (PackFile_ByteCode *)IMCC_compile_file_s(interp, filename, &err);
         Parrot_str_free_cstring(filename);
 
         if (cs)
@@ -4531,6 +4538,7 @@
     }
 }
 
+
 /*
 
 =item C<void PackFile_fixup_subs>


More information about the parrot-commits mailing list