Author: bernhard
Date: Thu Nov 27 12:12:54 2008
New Revision: 33276

Added:
   trunk/languages/pipp/src/pmc/phpnull.pmc   (contents, props changed)
      - copied, changed from r33274, /trunk/languages/pipp/src/pmc/phpundef.pmc
   trunk/languages/pipp/t/pmc/null.t   (contents, props changed)
      - copied, changed from r33274, /trunk/languages/pipp/t/pmc/boolean.t
Removed:
   trunk/languages/pipp/src/pmc/phpundef.pmc
Modified:
   trunk/MANIFEST
   trunk/languages/pipp/config/makefiles/root.in
   trunk/languages/pipp/src/common/php_API.pir
   trunk/languages/pipp/src/common/php_MACRO.pir
   trunk/languages/pipp/src/common/php_array.pir
   trunk/languages/pipp/src/common/php_builtin.pir
   trunk/languages/pipp/src/common/php_math.pir
   trunk/languages/pipp/src/common/php_type.pir
   trunk/languages/pipp/src/pct/actions.pm
   trunk/languages/pipp/src/phc/phc_xml_to_past_xml.xsl
   trunk/languages/pipp/src/pmc/php.pmc
   trunk/languages/pipp/src/pmc/php_private.h
   trunk/languages/pipp/t/pmc/array.t
   trunk/languages/pipp/t/pmc/boolean.t

Log:
[pipp] Rename PhpUndef to PhpNull, because undefined is null in PHP


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Thu Nov 27 12:12:54 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Thu Nov 27 19:05:40 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Nov 27 20:10:09 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -2391,9 +2391,9 @@
 languages/pipp/src/pmc/phpboolean.pmc                       [pipp]
 languages/pipp/src/pmc/phpfloat.pmc                         [pipp]
 languages/pipp/src/pmc/phpinteger.pmc                       [pipp]
+languages/pipp/src/pmc/phpnull.pmc                          [pipp]
 languages/pipp/src/pmc/phpresource.pmc                      [pipp]
 languages/pipp/src/pmc/phpstring.pmc                        [pipp]
-languages/pipp/src/pmc/phpundef.pmc                         [pipp]
 languages/pipp/t/harness                                    [pipp]
 languages/pipp/t/in_php/01_sea_only.t                       [pipp]
 languages/pipp/t/in_php/02_sanity.t                         [pipp]
@@ -2433,6 +2433,7 @@
 languages/pipp/t/php/variables.t                            [pipp]
 languages/pipp/t/pmc/array.t                                [pipp]
 languages/pipp/t/pmc/boolean.t                              [pipp]
+languages/pipp/t/pmc/null.t                                 [pipp]
 languages/punie/MAINTAINER                                  [punie]
 languages/punie/README                                      [punie]
 languages/punie/config/makefiles/root.in                    [punie]

Modified: trunk/languages/pipp/config/makefiles/root.in
==============================================================================
--- trunk/languages/pipp/config/makefiles/root.in       (original)
+++ trunk/languages/pipp/config/makefiles/root.in       Thu Nov 27 12:12:54 2008
@@ -36,7 +36,7 @@
  phpinteger \
  phpresource \
  phpstring \
- phpundef
+ phpnull
 
 PMC_SOURCES = \
  $(PMCDIR)/php.pmc \
@@ -46,7 +46,7 @@
  $(PMCDIR)/phpinteger.pmc \
  $(PMCDIR)/phpresource.pmc \
  $(PMCDIR)/phpstring.pmc \
- $(PMCDIR)/phpundef.pmc
+ $(PMCDIR)/phpnull.pmc
 
 HASH_SOURCES = $(HASHDIR)/pipp_hash.c
 

Modified: trunk/languages/pipp/src/common/php_API.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_API.pir (original)
+++ trunk/languages/pipp/src/common/php_API.pir Thu Nov 27 12:12:54 2008
@@ -208,7 +208,7 @@
     unless c == 'l' goto not_long
     $I0 = isa arg, 'PhpInteger'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     if $I0 goto L11
     $I0 = isa arg, 'PhpFloat'
     if $I0 goto L11
@@ -235,7 +235,7 @@
     unless c == 'd' goto not_double
     $I0 = isa arg, 'PhpFloat'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     if $I0 goto L21
     $I0 = isa arg, 'PhpInteger'
     if $I0 goto L21
@@ -263,7 +263,7 @@
 #    $I0 = isa arg, 'PhpString'
     $I0 = isa arg, 'String'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     if $I0 goto L31
     $I0 = isa arg, 'PhpFloat'
     if $I0 goto L31
@@ -285,7 +285,7 @@
     unless c == 'b' goto not_boolean
     $I0 = isa arg, 'PhpBoolean'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     if $I0 goto L41
     $I0 = isa arg, 'PhpFloat'
     if $I0 goto L41
@@ -305,7 +305,7 @@
     unless c == 'r' goto not_resource
     $I0 = isa arg, 'PhpResource'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     unless $I0 goto L51
     unless return_null goto L51
     goto L5
@@ -315,7 +315,7 @@
     unless c == 'a' goto not_array
     $I0 = isa arg, 'PhpArray'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     unless $I0 goto L61
     unless return_null goto L61
     goto L5
@@ -325,7 +325,7 @@
     unless c == 'h' goto not_hash
     $I0 = isa arg, 'PhpArray'
     if $I0 goto L5
-    $I0 = isa arg, 'PhpUndef'
+    $I0 = isa arg, 'PhpNull'
     unless $I0 goto L71
     unless return_null goto L71
     goto L5

Modified: trunk/languages/pipp/src/common/php_MACRO.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_MACRO.pir       (original)
+++ trunk/languages/pipp/src/common/php_MACRO.pir       Thu Nov 27 12:12:54 2008
@@ -106,7 +106,7 @@
 =cut
 
 .macro RETURN_NULL()
-    new $P0, 'PhpUndef'
+    new $P0, 'PhpNull'
     .return ($P0)
 .endm
 

Modified: trunk/languages/pipp/src/common/php_array.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_array.pir       (original)
+++ trunk/languages/pipp/src/common/php_array.pir       Thu Nov 27 12:12:54 2008
@@ -678,7 +678,7 @@
     if $I0 goto L1
     .RETURN_NULL()
   L1:
-    $I0 = isa array, 'PhpUndef'
+    $I0 = isa array, 'PhpNull'
     unless $I0 goto L2
     .RETURN_LONG(0)
   L2:

Modified: trunk/languages/pipp/src/common/php_builtin.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_builtin.pir     (original)
+++ trunk/languages/pipp/src/common/php_builtin.pir     Thu Nov 27 12:12:54 2008
@@ -103,7 +103,7 @@
     if $I0 goto L4
     $I0 = isa $P2, 'PhpResource'
     if $I0 goto L4
-    $I0 = isa $P2, 'PhpUndef'
+    $I0 = isa $P2, 'PhpNull'
     if $I0 goto L4
     $I0 = isa $P2, 'PhpObject'
     unless $I0 goto L5

Modified: trunk/languages/pipp/src/common/php_math.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_math.pir        (original)
+++ trunk/languages/pipp/src/common/php_math.pir        Thu Nov 27 12:12:54 2008
@@ -664,7 +664,7 @@
     $P2 = shift args
     $I2 = $P2
     $P3 = shift args
-    $I0 = isa $P3, 'PhpUndef'
+    $I0 = isa $P3, 'PhpNull'
     if $I0 goto L4
     dec_point = $P3
     $I3 = length dec_point
@@ -672,7 +672,7 @@
     dec_point =substr dec_point, 0, 1
   L4:
     $P4 = shift args
-    $I0 = isa $P4, 'PhpUndef'
+    $I0 = isa $P4, 'PhpNull'
     if $I0 goto L5
     thousand_sep = $P4
     $I4 = length thousand_sep

Modified: trunk/languages/pipp/src/common/php_type.pir
==============================================================================
--- trunk/languages/pipp/src/common/php_type.pir        (original)
+++ trunk/languages/pipp/src/common/php_type.pir        Thu Nov 27 12:12:54 2008
@@ -147,7 +147,7 @@
 
 .sub 'is_null'
     .param pmc args :slurpy
-    .IS_TYPE('PhpUndef', args)
+    .IS_TYPE('PhpNull', args)
 .end
 
 =item C<bool is_numeric(mixed value)>

Modified: trunk/languages/pipp/src/pct/actions.pm
==============================================================================
--- trunk/languages/pipp/src/pct/actions.pm     (original)
+++ trunk/languages/pipp/src/pct/actions.pm     Thu Nov 27 12:12:54 2008
@@ -372,7 +372,7 @@
 method NULL($/) {
     make PAST::Val.new(
              :value( 0 ),
-             :returns('PhpUndef'),
+             :returns('PhpNull'),
              :node($/)
          );
 }

Modified: trunk/languages/pipp/src/phc/phc_xml_to_past_xml.xsl
==============================================================================
--- trunk/languages/pipp/src/phc/phc_xml_to_past_xml.xsl        (original)
+++ trunk/languages/pipp/src/phc/phc_xml_to_past_xml.xsl        Thu Nov 27 
12:12:54 2008
@@ -213,7 +213,7 @@
 </xsl:template>
 
 <xsl:template match="phc:Token_null" >
-  <past:Val returns="PhpUndef" >
+  <past:Val returns="PhpNull" >
     <xsl:attribute name="value" >0</xsl:attribute>
   </past:Val>
 </xsl:template>

Modified: trunk/languages/pipp/src/pmc/php.pmc
==============================================================================
--- trunk/languages/pipp/src/pmc/php.pmc        (original)
+++ trunk/languages/pipp/src/pmc/php.pmc        Thu Nov 27 12:12:54 2008
@@ -25,7 +25,7 @@
 INTVAL dynpmc_PhpFloat;
 INTVAL dynpmc_PhpInteger;
 INTVAL dynpmc_PhpString;
-INTVAL dynpmc_PhpUndef;
+INTVAL dynpmc_PhpNull;
 
 static PMC * Php_PMC;
 
@@ -52,8 +52,8 @@
               const_string(INTERP, "PhpInteger"));
             dynpmc_PhpString = pmc_type(INTERP,
               const_string(INTERP, "PhpString"));
-            dynpmc_PhpUndef = pmc_type(INTERP,
-              const_string(INTERP, "PhpUndef"));
+            dynpmc_PhpNull = pmc_type(INTERP,
+              const_string(INTERP, "PhpNull"));
         }
     }
 

Modified: trunk/languages/pipp/src/pmc/php_private.h
==============================================================================
--- trunk/languages/pipp/src/pmc/php_private.h  (original)
+++ trunk/languages/pipp/src/pmc/php_private.h  Thu Nov 27 12:12:54 2008
@@ -13,7 +13,7 @@
 extern INTVAL dynpmc_PhpFloat;
 extern INTVAL dynpmc_PhpInteger;
 extern INTVAL dynpmc_PhpString;
-extern INTVAL dynpmc_PhpUndef;
+extern INTVAL dynpmc_PhpNull;
 
 #endif /* PARROT_PHP_PRIVATE_H_GUARD */
 

Copied: trunk/languages/pipp/src/pmc/phpnull.pmc (from r33274, 
/trunk/languages/pipp/src/pmc/phpundef.pmc)
==============================================================================
--- /trunk/languages/pipp/src/pmc/phpundef.pmc  (original)
+++ trunk/languages/pipp/src/pmc/phpnull.pmc    Thu Nov 27 12:12:54 2008
@@ -4,7 +4,7 @@
 
 =head1 NAME
 
-src/pmc/phpundef.pmc - PHP Undef
+src/pmc/phpnull.pmc - PHP Null
 
 =head1 DESCRIPTION
 
@@ -18,7 +18,7 @@
 
 #include "php_private.h"
 
-pmclass PhpUndef
+pmclass PhpNull
     extends  Undef
     dynpmc
     group    php_group

Modified: trunk/languages/pipp/t/pmc/array.t
==============================================================================
--- trunk/languages/pipp/t/pmc/array.t  (original)
+++ trunk/languages/pipp/t/pmc/array.t  Thu Nov 27 12:12:54 2008
@@ -4,11 +4,11 @@
 
 =head1 NAME
 
-languages/pipp/t/pmc/array.t - test the PhpArray PMC
+t/pmc/array.t - test the PhpArray PMC
 
 =head1 SYNOPSIS
 
-% prove languages/pipp/t/pmc/array.t
+    perl t/harness t/pmc/array.t
 
 =head1 DESCRIPTION
 

Modified: trunk/languages/pipp/t/pmc/boolean.t
==============================================================================
--- trunk/languages/pipp/t/pmc/boolean.t        (original)
+++ trunk/languages/pipp/t/pmc/boolean.t        Thu Nov 27 12:12:54 2008
@@ -8,7 +8,7 @@
 
 =head1 SYNOPSIS
 
-    % prove t/pmc/boolean.t
+    % perl t/harness t/pmc/boolean.t
 
 =head1 DESCRIPTION
 

Copied: trunk/languages/pipp/t/pmc/null.t (from r33274, 
/trunk/languages/pipp/t/pmc/boolean.t)
==============================================================================
--- /trunk/languages/pipp/t/pmc/boolean.t       (original)
+++ trunk/languages/pipp/t/pmc/null.t   Thu Nov 27 12:12:54 2008
@@ -4,15 +4,15 @@
 
 =head1 NAME
 
-t/pmc/boolean.t - Boolean PMC
+t/pmc/null.t - Testing the PhpNull PMC
 
 =head1 SYNOPSIS
 
-    % prove t/pmc/boolean.t
+    % perl t/harness t/pmc/null.t
 
 =head1 DESCRIPTION
 
-Tests C<PhpBoolean> PMC.
+Tests C<PhpNull> PMC.
 
 =cut
 
@@ -21,22 +21,17 @@
 
 .sub 'main' :main
     .include "include/test_more.pir"
-    plan(2)
+    plan(1)
 
     truth_tests()
 .end
 
 .sub truth_tests
-    .local pmc true, false
+    .local pmc null_value
 
-    true = new 'PhpBoolean'
-    true = 1
+    null_value = new 'PhpNull'
 
-    false = new 'PhpBoolean'
-    false = 0
-
-    is(true, 1, "true PhpBoolean is 1")
-    is(false, "", "false PhpBoolean is empty")
+    nok(null_value,"PhpNull isn't")
 .end
 
 # Local Variables:

Reply via email to