Author: fperrad
Date: Fri Apr 6 01:34:17 2007
New Revision: 18007
Modified:
trunk/languages/WMLScript/pmc/wmlsboolean.pmc
trunk/languages/WMLScript/pmc/wmlsstring.pmc
Log:
[WMLScript]
- refactoring with new rewrite in pmc2c
Modified: trunk/languages/WMLScript/pmc/wmlsboolean.pmc
==============================================================================
--- trunk/languages/WMLScript/pmc/wmlsboolean.pmc (original)
+++ trunk/languages/WMLScript/pmc/wmlsboolean.pmc Fri Apr 6 01:34:17 2007
@@ -105,10 +105,10 @@
*/
void increment () {
- const INTVAL a = VTABLE_get_integer(INTERP, SELF);
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsInteger);
- VTABLE_set_integer_native(INTERP, SELF, a);
- VTABLE_increment(INTERP, SELF);
+ const INTVAL a = DYNSELF.get_integer();
+ DYNSELF.morph(dynpmc_WmlsInteger);
+ DYNSELF.set_integer_native(a);
+ DYNSELF.increment();
}
/*
@@ -119,10 +119,10 @@
*/
void decrement () {
- const INTVAL a = VTABLE_get_integer(INTERP, SELF);
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsInteger);
- VTABLE_set_integer_native(INTERP, SELF, a);
- VTABLE_decrement(INTERP, SELF);
+ const INTVAL a = DYNSELF.get_integer();
+ DYNSELF.morph(dynpmc_WmlsInteger);
+ DYNSELF.set_integer_native(a);
+ DYNSELF.decrement();
}
/*
Modified: trunk/languages/WMLScript/pmc/wmlsstring.pmc
==============================================================================
--- trunk/languages/WMLScript/pmc/wmlsstring.pmc (original)
+++ trunk/languages/WMLScript/pmc/wmlsstring.pmc Fri Apr 6 01:34:17 2007
@@ -62,19 +62,19 @@
void increment () {
PMC * trans = SELF.parseNumber();
if (trans->vtable->base_type == dynpmc_WmlsInvalid) {
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsInvalid);
+ DYNSELF.morph(dynpmc_WmlsInvalid);
}
else if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL a = VTABLE_get_integer(INTERP, trans);
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsInteger);
- VTABLE_set_integer_native(INTERP, SELF, a);
+ DYNSELF.morph(dynpmc_WmlsInteger);
+ DYNSELF.set_integer_native(a);
}
else if (trans->vtable->base_type == dynpmc_WmlsFloat) {
const FLOATVAL a = VTABLE_get_number(INTERP, trans);
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsFloat);
- VTABLE_set_number_native(INTERP, SELF, a);
+ DYNSELF.morph(dynpmc_WmlsFloat);
+ DYNSELF.set_number_native(a);
}
- VTABLE_increment(INTERP, SELF);
+ DYNSELF.increment();
}
/*
@@ -87,19 +87,19 @@
void decrement () {
PMC * trans = SELF.parseNumber();
if (trans->vtable->base_type == dynpmc_WmlsInvalid) {
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsInvalid);
+ DYNSELF.morph(dynpmc_WmlsInvalid);
}
else if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL a = VTABLE_get_integer(INTERP, trans);
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsInteger);
- VTABLE_set_integer_native(INTERP, SELF, a);
+ DYNSELF.morph(dynpmc_WmlsInteger);
+ DYNSELF.set_integer_native(a);
}
else if (trans->vtable->base_type == dynpmc_WmlsFloat) {
const FLOATVAL a = VTABLE_get_number(INTERP, trans);
- VTABLE_morph(INTERP, SELF, dynpmc_WmlsFloat);
- VTABLE_set_number_native(INTERP, SELF, a);
+ DYNSELF.morph(dynpmc_WmlsFloat);
+ DYNSELF.set_number_native(a);
}
- VTABLE_decrement(INTERP, SELF);
+ DYNSELF.decrement();
}
/*
@@ -1564,7 +1564,7 @@
char *s1;
char *s2;
- rep = VTABLE_get_string(INTERP, SELF);
+ rep = DYNSELF.get_string();
s1 = string_to_cstring(INTERP, rep);
d = strtol(s1, &s2, 10);
if ( s1 != s2 && (*s2 == '\0' || isspace(*s2)) ) {
@@ -1588,7 +1588,7 @@
char *s1;
char *s2;
- rep = VTABLE_get_string(INTERP, SELF);
+ rep = DYNSELF.get_string();
s1 = string_to_cstring(INTERP, rep);
d = strtod(s1, &s2);
if ( s1 != s2 && (*s2 == '\0' || isspace(*s2)) ) {