Author: autrijus
Date: Sat Apr 22 17:06:30 2006
New Revision: 12399

Modified:
   branches/pge-pm/   (props changed)
   branches/pge-pm/docs/embed.pod
   branches/pge-pm/languages/pheme/lib/pge2past.tg
   branches/pge-pm/languages/pheme/t/lambda.t
   branches/pge-pm/src/hll.c
   branches/pge-pm/t/pmc/objects.t

Log:
 [EMAIL PROTECTED] (orig r12392):  ambs | 2006-04-22 03:55:31 +0800
 fixed typo 
 
 [EMAIL PROTECTED] (orig r12393):  chromatic | 2006-04-22 04:20:00 +0800
 s/defun/define/ to match Scheme, not Lisp.
 [EMAIL PROTECTED] (orig r12394):  petdance | 2006-04-22 08:21:27 +0800
 Consting parms
 [EMAIL PROTECTED] (orig r12395):  pmichaud | 2006-04-22 08:57:28 +0800
 [parrot]: Added test for "isa $P0, ['Foo';'Bar']"
 
 [EMAIL PROTECTED] (orig r12396):  petdance | 2006-04-22 13:14:25 +0800
 consting local vars
 [EMAIL PROTECTED] (orig r12397):  petdance | 2006-04-22 13:17:26 +0800
 Fixed incorrect consting
 [EMAIL PROTECTED] (orig r12398):  pmichaud | 2006-04-23 00:11:26 +0800
 * Undoing r12396/12397, caused segfaults on many platforms.
 


Modified: branches/pge-pm/docs/embed.pod
==============================================================================
--- branches/pge-pm/docs/embed.pod      (original)
+++ branches/pge-pm/docs/embed.pod      Sat Apr 22 17:06:30 2006
@@ -203,7 +203,7 @@
 Allocates and returns a new Parrot interpreter. C<parent> is NULL for the main
 interpreter that will be destroyed last.
 
-=item C<void Parrot_setflag(Parrot_Interp, Parrot_Interp_flag, 
Parrot_Interp_flag_val)>
+=item C<void Parrot_setflags(Parrot_Interp, Parrot_Interp_flag, 
Parrot_Interp_flag_val)>
 
 Sets a flag in the Parrot interpreter.
 

Modified: branches/pge-pm/languages/pheme/lib/pge2past.tg
==============================================================================
--- branches/pge-pm/languages/pheme/lib/pge2past.tg     (original)
+++ branches/pge-pm/languages/pheme/lib/pge2past.tg     Sat Apr 22 17:06:30 2006
@@ -98,7 +98,7 @@
 
        .local string op_name
        op_name = op.'op'()
-       if op_name == 'defun' goto return_sub
+       if op_name == 'define' goto return_sub
        .return( node )
 
   return_sub:

Modified: branches/pge-pm/languages/pheme/t/lambda.t
==============================================================================
--- branches/pge-pm/languages/pheme/t/lambda.t  (original)
+++ branches/pge-pm/languages/pheme/t/lambda.t  Sat Apr 22 17:06:30 2006
@@ -2,7 +2,7 @@
 
 (plan 3)
 
-(defun carcar
+(define carcar
        (lambda (l)
                (car (cdr l))))
 

Modified: branches/pge-pm/src/hll.c
==============================================================================
--- branches/pge-pm/src/hll.c   (original)
+++ branches/pge-pm/src/hll.c   Sat Apr 22 17:06:30 2006
@@ -143,16 +143,15 @@
 INTVAL
 Parrot_get_HLL_id(Interp* interpreter, STRING *hll_name)
 {
-    INTVAL i, n;
-    PMC *hll_info, *entry, *name_pmc;
-    STRING *name;
+    INTVAL i;
 
-    hll_info = interpreter->HLL_info;
-    n = VTABLE_elements(interpreter, hll_info);
-    for (i = 0; i < n; ++i) {
-        entry = VTABLE_get_pmc_keyed_int(interpreter, hll_info, i);
-        name_pmc = VTABLE_get_pmc_keyed_int(interpreter, entry, e_HLL_name);
-        name = VTABLE_get_string(interpreter, name_pmc);
+    PMC * const hll_info = interpreter->HLL_info;
+    const INTVAL nelements = VTABLE_elements(interpreter, hll_info);
+
+    for (i = 0; i < nelements; ++i) {
+        PMC * const entry = VTABLE_get_pmc_keyed_int(interpreter, hll_info, i);
+        PMC * const name_pmc = VTABLE_get_pmc_keyed_int(interpreter, entry, 
e_HLL_name);
+        STRING * const name = VTABLE_get_string(interpreter, name_pmc);
         if (!string_equal(interpreter, name, hll_name))
             return i;
     }
@@ -163,12 +162,11 @@
 Parrot_register_HLL_type(Interp *interpreter, INTVAL hll_id,
        INTVAL core_type, INTVAL hll_type)
 {
-    PMC *entry, *type_hash, *hll_info;
+    PMC *entry, *type_hash;
     Hash *hash;
-    INTVAL n;
 
-    hll_info = interpreter->HLL_info;
-    n = VTABLE_elements(interpreter, hll_info);
+    PMC * const hll_info = interpreter->HLL_info;
+    const INTVAL n = VTABLE_elements(interpreter, hll_info);
     if (hll_id >= n) {
         real_exception(interpreter, NULL, E_ValueError,
                 "no such HLL id (%vd)", hll_id);

Modified: branches/pge-pm/t/pmc/objects.t
==============================================================================
--- branches/pge-pm/t/pmc/objects.t     (original)
+++ branches/pge-pm/t/pmc/objects.t     Sat Apr 22 17:06:30 2006
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 72;
+use Parrot::Test tests => 73;
 
 =head1 NAME
 
@@ -2118,3 +2118,16 @@
 CODE
 Perl6;PAST;Node
 OUTPUT
+
+pir_output_is(<<'CODE', <<'OUTPUT', "isa");
+.sub main :main
+    .local pmc base, o1, o2
+    base = subclass 'Hash', ['Perl6'; 'PAST'; 'Node']
+    $P0 = new [ 'Perl6'; 'PAST'; 'Node' ]
+    $I0 = isa $P0, [ 'Perl6'; 'PAST'; 'Node']
+    print $I0
+    print "\n"
+.end
+CODE
+0
+OUTPUT

Reply via email to