develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35788 - in trunk: . compilers/imcc docs/pdds languages/lua/src/pmc src src/pmc t/pmc tools/dev

From:
chromatic
Date:
January 19, 2009 21:19
Subject:
[svn:parrot] r35788 - in trunk: . compilers/imcc docs/pdds languages/lua/src/pmc src src/pmc t/pmc tools/dev
Message ID:
20090120051928.91452CB9AE@x12.develooper.com
Author: chromatic
Date: Mon Jan 19 21:19:27 2009
New Revision: 35788

Modified:
   trunk/DEPRECATED.pod
   trunk/compilers/imcc/pbc.c
   trunk/languages/lua/src/pmc/luaboolean.pmc
   trunk/languages/lua/src/pmc/luanil.pmc
   trunk/languages/lua/src/pmc/luanumber.pmc
   trunk/languages/lua/src/pmc/luastring.pmc
   trunk/src/dynext.c
   trunk/src/pmc/fixedintegerarray.pmc
   trunk/src/pmc/float.pmc
   trunk/src/pmc/integer.pmc
   trunk/src/pmc/string.pmc
   trunk/src/vtable.tbl
   trunk/t/pmc/float.t
   trunk/t/pmc/string.t
   trunk/tools/dev/vtablize.pl

Changes in other areas also in this revision:
Modified:
   trunk/docs/pdds/pdd17_pmc.pod
   trunk/docs/pdds/pdd28_strings.pod

Log:
[PMC] Changed new_from_string VTABLE entry name to instantiate_str, per RT
#47011.  That's good enough to meet the deprecation goal.  Sigh.

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod	(original)
+++ trunk/DEPRECATED.pod	Mon Jan 19 21:19:27 2009
@@ -33,16 +33,6 @@
 
 =back
 
-=head1 vtable entries
-
-=over 4
-
-=item * C<new_from_string> [post 0.5.0]
-
-See RT #47011.
-
-=back
-
 =head1 Opcodes
 
 =over 4

Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c	(original)
+++ trunk/compilers/imcc/pbc.c	Mon Jan 19 21:19:27 2009
@@ -1782,7 +1782,7 @@
     else
         s = string_unescape_cstring(interp, r->name, 0, NULL);
 
-    p       = VTABLE_new_from_string(interp, _class, s, PObj_constant_FLAG);
+    p = VTABLE_instantiate_str(interp, _class, s, PObj_constant_FLAG);
 
     /* append PMC constant */
     r->color = add_const_table_pmc(interp, p);

Modified: trunk/languages/lua/src/pmc/luaboolean.pmc
==============================================================================
--- trunk/languages/lua/src/pmc/luaboolean.pmc	(original)
+++ trunk/languages/lua/src/pmc/luaboolean.pmc	Mon Jan 19 21:19:27 2009
@@ -49,14 +49,14 @@
 
 /*
 
-=item C<PMC new_from_string(STRING *rep)>
+=item C<PMC instantiate_str(STRING *rep)>
 
 Class method to construct an Boolean from the string representation C<rep>.
 
 =cut
 
 */
-    VTABLE PMC* new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC* instantiate_str(STRING *rep, INTVAL flags) {
         PMC *res;
         INTVAL type = PMC_type(SELF);
         if (flags & PObj_constant_FLAG)

Modified: trunk/languages/lua/src/pmc/luanil.pmc
==============================================================================
--- trunk/languages/lua/src/pmc/luanil.pmc	(original)
+++ trunk/languages/lua/src/pmc/luanil.pmc	Mon Jan 19 21:19:27 2009
@@ -40,7 +40,7 @@
 
 /*
 
-=item C<PMC* new_from_string(STRING *rep, INTVAL flags)>
+=item C<PMC* instantiate_str(STRING *rep, INTVAL flags)>
 
 Allow :
 
@@ -49,7 +49,7 @@
 =cut
 
 */
-    VTABLE PMC* new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC* instantiate_str(STRING *rep, INTVAL flags) {
         PMC *res;
         INTVAL type = PMC_type(SELF);
         if (flags & PObj_constant_FLAG)

Modified: trunk/languages/lua/src/pmc/luanumber.pmc
==============================================================================
--- trunk/languages/lua/src/pmc/luanumber.pmc	(original)
+++ trunk/languages/lua/src/pmc/luanumber.pmc	Mon Jan 19 21:19:27 2009
@@ -50,10 +50,10 @@
 
 /*
 
-=item C<PMC *new_from_string(STRING *rep, INTVAL flags)>
+=item C<PMC *instantiate_str(STRING *rep, INTVAL flags)>
 
 Return a LuaNumber PMC created from a string (Implementation
-is based on new_from_string() from Integer PMC).
+is based on instantiate_str() from Integer PMC).
 
 Allow :
 
@@ -62,7 +62,7 @@
 =cut
 
 */
-    VTABLE PMC *new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC *instantiate_str(STRING *rep, INTVAL flags) {
         PMC *res;
         INTVAL type = PMC_type(SELF);
         if (flags & PObj_constant_FLAG)

Modified: trunk/languages/lua/src/pmc/luastring.pmc
==============================================================================
--- trunk/languages/lua/src/pmc/luastring.pmc	(original)
+++ trunk/languages/lua/src/pmc/luastring.pmc	Mon Jan 19 21:19:27 2009
@@ -48,7 +48,7 @@
 
 /*
 
-=item C<PMC* new_from_string(STRING *rep, INTVAL flags)>
+=item C<PMC* instantiate_str(STRING *rep, INTVAL flags)>
 
 Allow :
 
@@ -57,7 +57,7 @@
 =cut
 
 */
-    VTABLE PMC* new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC* instantiate_str(STRING *rep, INTVAL flags) {
         PMC *res;
         INTVAL type = PMC_type(SELF);
         if (flags & PObj_constant_FLAG)
@@ -94,7 +94,7 @@
 
 */
     VTABLE PMC* clone() {
-        return VTABLE_new_from_string(INTERP, SELF, PMC_str_val(SELF), 0);
+        return VTABLE_instantiate_str(INTERP, SELF, PMC_str_val(SELF), 0);
     }
 
 /*

Modified: trunk/src/dynext.c
==============================================================================
--- trunk/src/dynext.c	(original)
+++ trunk/src/dynext.c	Mon Jan 19 21:19:27 2009
@@ -477,7 +477,7 @@
 make_string_pmc(PARROT_INTERP, ARGIN(STRING *string))
 {
     ASSERT_ARGS(make_string_pmc)
-    PMC * const ret = VTABLE_new_from_string(interp,
+    PMC * const ret = VTABLE_instantiate_str(interp,
         interp->vtables[enum_class_String]->pmc_class,
         string, PObj_constant_FLAG);
     return ret;

Modified: trunk/src/pmc/fixedintegerarray.pmc
==============================================================================
--- trunk/src/pmc/fixedintegerarray.pmc	(original)
+++ trunk/src/pmc/fixedintegerarray.pmc	Mon Jan 19 21:19:27 2009
@@ -46,7 +46,7 @@
 
 /*
 
-=item C<PMC new_from_string(STRING *rep, INTVAL flags)>
+=item C<PMC instantiate_str(STRING *rep, INTVAL flags)>
 
 Class method to construct an array from the string representation C<rep>,
 which is a string I<"(el0, el1, ...)">. C<flags> may have the
@@ -56,7 +56,7 @@
 =cut
 
 */
-    VTABLE PMC *new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC *instantiate_str(STRING *rep, INTVAL flags) {
         const INTVAL type = SELF->vtable->base_type;
         INTVAL  n, elem, i, l;
         char   *source, *p, *start;

Modified: trunk/src/pmc/float.pmc
==============================================================================
--- trunk/src/pmc/float.pmc	(original)
+++ trunk/src/pmc/float.pmc	Mon Jan 19 21:19:27 2009
@@ -71,14 +71,14 @@
 
 /*
 
-=item C<PMC *new_from_string(STRING *rep, INTVAL flags)>
+=item C<PMC *instantiate_str(STRING *rep, INTVAL flags)>
 
 Class method to construct an Integer from the string representation C<rep>.
 
 =cut
 
 */
-    VTABLE PMC *new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC *instantiate_str(STRING *rep, INTVAL flags) {
         const INTVAL type = SELF->vtable->base_type;
         PMC * const res =
             (flags & PObj_constant_FLAG)

Modified: trunk/src/pmc/integer.pmc
==============================================================================
--- trunk/src/pmc/integer.pmc	(original)
+++ trunk/src/pmc/integer.pmc	Mon Jan 19 21:19:27 2009
@@ -99,14 +99,14 @@
 
 /*
 
-=item C<PMC new_from_string(STRING *rep)>
+=item C<PMC instantiate_str(STRING *rep)>
 
 Class method to construct an Integer from the string representation C<rep>.
 
 =cut
 
 */
-VTABLE PMC *new_from_string(STRING *rep, INTVAL flags) {
+VTABLE PMC *instantiate_str(STRING *rep, INTVAL flags) {
     const INTVAL type = SELF->vtable->base_type;
     PMC * const  res  = (flags & PObj_constant_FLAG)
                       ? constant_pmc_new(INTERP, type)

Modified: trunk/src/pmc/string.pmc
==============================================================================
--- trunk/src/pmc/string.pmc	(original)
+++ trunk/src/pmc/string.pmc	Mon Jan 19 21:19:27 2009
@@ -41,14 +41,14 @@
 
 /*
 
-=item C<PMC new_from_string(STRING *rep)>
+=item C<PMC instantiate_str(STRING *rep)>
 
 Class method to construct a String from the string representation C<rep>.
 
 =cut
 
 */
-    VTABLE PMC *new_from_string(STRING *rep, INTVAL flags) {
+    VTABLE PMC *instantiate_str(STRING *rep, INTVAL flags) {
         PMC *res;
         const INTVAL type = SELF->vtable->base_type;
 

Modified: trunk/src/vtable.tbl
==============================================================================
--- trunk/src/vtable.tbl	(original)
+++ trunk/src/vtable.tbl	Mon Jan 19 21:19:27 2009
@@ -10,7 +10,7 @@
 # init must be first for JITed vtable meths
 void init_pmc(PMC* initializer)
 PMC* instantiate(PMC* sig)
-PMC* new_from_string(STRING* rep, INTVAL flags)
+PMC* instantiate_str(STRING* rep, INTVAL flags)
 void morph(INTVAL type) :write
 void mark()
 void destroy()

Modified: trunk/t/pmc/float.t
==============================================================================
--- trunk/t/pmc/float.t	(original)
+++ trunk/t/pmc/float.t	Mon Jan 19 21:19:27 2009
@@ -1100,7 +1100,7 @@
 1
 OUTPUT
 
-pir_output_is( <<'CODE', <<OUTPUT, "new_from_string" );
+pir_output_is( <<'CODE', <<OUTPUT, "instantiate_str" );
 .sub main :main
     .const 'Float' pi = "3.1"
     print pi

Modified: trunk/t/pmc/string.t
==============================================================================
--- trunk/t/pmc/string.t	(original)
+++ trunk/t/pmc/string.t	Mon Jan 19 21:19:27 2009
@@ -61,7 +61,7 @@
     test_string_trans()
     reverse_p0__reverse_string()
     is_integer__check_integer()
-    new_from_string()
+    instantiate_str()
     get_string_returns_cow_string()
     to_int_1()
     elements_gives_length_of_string()
@@ -909,7 +909,7 @@
   ok( $I0, '... +1' )
 .end
 
-.sub new_from_string
+.sub instantiate_str
     .const 'String' ok = "ok"
     is( ok, "ok", ".const 'String'" )
 .end

Modified: trunk/tools/dev/vtablize.pl
==============================================================================
--- trunk/tools/dev/vtablize.pl	(original)
+++ trunk/tools/dev/vtablize.pl	Mon Jan 19 21:19:27 2009
@@ -1,6 +1,6 @@
 #! perl -pi.bak
 # $Id$
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
 
 =head1 NAME
 
@@ -31,7 +31,7 @@
 s/^(\s*)(void\s+init\(\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+init_pmc\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(PMC\s+\*instantiate\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*new_from_string\(STRING\s+\*\w*,\s+INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
+s/^(\s*)(PMC\s+\*instantiate_str\(STRING\s+\*\w*,\s+INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+morph\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+mark\(\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+destroy\(\)\s+{)/$1VTABLE $2/;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About