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

[svn:parrot] r35352 - branches/pdd09gc_part2/src/pmc

From:
chromatic
Date:
January 10, 2009 13:04
Subject:
[svn:parrot] r35352 - branches/pdd09gc_part2/src/pmc
Message ID:
20090110210418.6C9C3CB9F9@x12.develooper.com
Author: chromatic
Date: Sat Jan 10 13:04:15 2009
New Revision: 35352

Modified:
   branches/pdd09gc_part2/src/pmc/integer.pmc

Log:
[PMC] Made instantiate vtable entry for Integer PMC use the new_pmc() wrapper,
instead of manipulating a PMC header directly.


Modified: branches/pdd09gc_part2/src/pmc/integer.pmc
==============================================================================
--- branches/pdd09gc_part2/src/pmc/integer.pmc	(original)
+++ branches/pdd09gc_part2/src/pmc/integer.pmc	Sat Jan 10 13:04:15 2009
@@ -67,12 +67,10 @@
 */
 
 VTABLE PMC *instantiate(PMC *sig) {
-    PMC * const ret    = new_pmc_header(INTERP, 0);
+    PMC * const ret    = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
     opcode_t   *arg_op = interp->current_args;
     INTVAL      init   = 0;
 
-    ret->vtable        = interp->vtables[SELF->vtable->base_type];
-
     if (SIG_ELEMS(sig) == 2) {
         switch (SIG_ITEM(sig, 1)) {
             case PARROT_ARG_I:
@@ -89,7 +87,7 @@
         }
     }
 
-    PMC_int_val(ret) = init;
+    VTABLE_set_integer_native(INTERP, ret, init);
     return ret;
 }
 



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