Permalink
Browse files

replace VTABLE_morph by pmc_reuse

  • Loading branch information...
1 parent db83cdc commit f94c5bbaab9d0ffa130052fc5d630d850f8b81d4 @fperrad committed Feb 12, 2009
Showing with 205 additions and 204 deletions.
  1. +60 −60 pmc/wmlsboolean.pmc
  2. +22 −22 pmc/wmlsfloat.pmc
  3. +42 −42 pmc/wmlsinteger.pmc
  4. +81 −80 pmc/wmlsstring.pmc
View
120 pmc/wmlsboolean.pmc
@@ -121,7 +121,7 @@ Return the string "true" or "false".
*/
VTABLE void increment() {
const INTVAL a = SELF.get_integer();
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(a);
SELF.increment();
}
@@ -135,7 +135,7 @@ Return the string "true" or "false".
*/
VTABLE void decrement() {
const INTVAL a = SELF.get_integer();
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(a);
SELF.decrement();
}
@@ -154,7 +154,7 @@ Return the string "true" or "false".
}
VTABLE void i_absolute() {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -175,7 +175,7 @@ Return the string "true" or "false".
VTABLE void i_neg() {
const INTVAL result = - SELF.get_bool();
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
@@ -197,7 +197,7 @@ Return the string "true" or "false".
VTABLE void i_bitwise_not() {
const INTVAL result = ~ SELF.get_bool();
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
@@ -277,34 +277,34 @@ Return the string "true" or "false".
MULTI void i_add(WmlsInteger value) {
const INTVAL result = SELF.get_integer()
+ VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
MULTI void i_add(WmlsBoolean value) {
const INTVAL result = SELF.get_integer()
+ VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
MULTI void i_add(WmlsFloat value) {
const FLOATVAL result = SELF.get_number()
+ VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
MULTI void i_add(WmlsString value) {
STRING* const result = Parrot_str_concat(INTERP,
SELF.get_string(),
VTABLE_get_string(INTERP, value), 0);
- SELF.morph(dynpmc_WmlsString);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsString, 0);
SELF.set_string_native(result);
}
MULTI void i_add(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -362,21 +362,21 @@ Return the string "true" or "false".
MULTI void i_subtract(WmlsInteger value) {
const INTVAL result = SELF.get_integer()
- VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
MULTI void i_subtract(WmlsBoolean value) {
const INTVAL result = SELF.get_integer()
- VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
MULTI void i_subtract(WmlsFloat value) {
const FLOATVAL result = SELF.get_number()
- VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
@@ -388,16 +388,16 @@ Return the string "true" or "false".
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = SELF.get_integer()
- VTABLE_get_integer(INTERP, trans);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_subtract(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -455,21 +455,21 @@ Return the string "true" or "false".
MULTI void i_multiply(WmlsInteger value) {
const INTVAL result = SELF.get_integer()
* VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
MULTI void i_multiply(WmlsBoolean value) {
const INTVAL result = SELF.get_integer()
* VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
MULTI void i_multiply(WmlsFloat value) {
const FLOATVAL result = SELF.get_number()
* VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
@@ -481,16 +481,16 @@ Return the string "true" or "false".
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = SELF.get_integer()
* VTABLE_get_integer(INTERP, trans);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_multiply(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -560,35 +560,35 @@ Return the string "true" or "false".
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(WmlsInteger value) {
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(WmlsBoolean value) {
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -601,20 +601,20 @@ Return the string "true" or "false".
const FLOATVAL d = VTABLE_get_integer(INTERP, trans);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -673,23 +673,23 @@ Return the string "true" or "false".
const INTVAL d = VTABLE_get_integer(INTERP, value);
if (d != 0) {
const INTVAL result = SELF.get_integer() / d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_floor_divide(WmlsBoolean value) {
const INTVAL d = VTABLE_get_integer(INTERP, value);
if (d != 0) {
const INTVAL result = SELF.get_integer() / d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -702,20 +702,20 @@ Return the string "true" or "false".
const INTVAL d = VTABLE_get_integer(INTERP, trans);
if (d != 0) {
const INTVAL result = SELF.get_integer() / d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_floor_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -774,23 +774,23 @@ Return the string "true" or "false".
const INTVAL d = VTABLE_get_integer(INTERP, value);
if (d != 0) {
const INTVAL result = SELF.get_integer() % d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_modulus(WmlsBoolean value) {
const INTVAL d = VTABLE_get_integer(INTERP, value);
if (d != 0) {
const INTVAL result = SELF.get_integer() % d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -803,20 +803,20 @@ Return the string "true" or "false".
const INTVAL d = VTABLE_get_integer(INTERP, trans);
if (d != 0) {
const INTVAL result = SELF.get_integer() % d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_modulus(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -855,11 +855,11 @@ Return the string "true" or "false".
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
| VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -899,11 +899,11 @@ Return the string "true" or "false".
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
& VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -943,11 +943,11 @@ Return the string "true" or "false".
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
^ VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -987,11 +987,11 @@ Return the string "true" or "false".
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
>> VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1031,11 +1031,11 @@ Return the string "true" or "false".
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
>> VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1075,11 +1075,11 @@ Return the string "true" or "false".
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
<< VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
View
44 pmc/wmlsfloat.pmc
@@ -141,7 +141,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_not() {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -162,7 +162,7 @@ Returns a Parrot string representation of the number.
VTABLE void i_logical_not() {
const INTVAL result = ! SELF.get_bool();
- SELF.morph(dynpmc_WmlsBoolean);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsBoolean, 0);
SELF.set_bool(result);
}
@@ -240,12 +240,12 @@ Returns a Parrot string representation of the number.
STRING* const result = Parrot_str_concat(INTERP,
SELF.get_string(),
VTABLE_get_string(INTERP, value), 0);
- SELF.morph(dynpmc_WmlsString);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsString, 0);
SELF.set_string_native(result);
}
MULTI void i_add(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -329,12 +329,12 @@ Returns a Parrot string representation of the number.
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_subtract(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -418,12 +418,12 @@ Returns a Parrot string representation of the number.
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_multiply(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -496,7 +496,7 @@ Returns a Parrot string representation of the number.
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -507,7 +507,7 @@ Returns a Parrot string representation of the number.
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -518,7 +518,7 @@ Returns a Parrot string representation of the number.
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -534,16 +534,16 @@ Returns a Parrot string representation of the number.
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -560,7 +560,7 @@ Returns a Parrot string representation of the number.
}
void i_floor_divide(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -577,7 +577,7 @@ Returns a Parrot string representation of the number.
}
void i_modulus(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -594,7 +594,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_or(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -611,7 +611,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_and(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -628,7 +628,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_xor(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -645,7 +645,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_shr(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -662,7 +662,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_lsr(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -679,7 +679,7 @@ Returns a Parrot string representation of the number.
}
VTABLE void i_bitwise_shl(PMC* value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
View
84 pmc/wmlsinteger.pmc
@@ -155,7 +155,7 @@ Return the integer 0.
VTABLE void i_logical_not() {
const INTVAL result = ! SELF.get_bool();
- SELF.morph(dynpmc_WmlsBoolean);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsBoolean, 0);
SELF.set_bool(result);
}
@@ -226,20 +226,20 @@ Return the integer 0.
MULTI void i_add(WmlsFloat value) {
const FLOATVAL result = SELF.get_number()
+ VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
MULTI void i_add(WmlsString value) {
STRING* const result = Parrot_str_concat(INTERP,
SELF.get_string(),
VTABLE_get_string(INTERP, value), 0);
- SELF.morph(dynpmc_WmlsString);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsString, 0);
SELF.set_string_native(result);
}
MULTI void i_add(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -309,7 +309,7 @@ Return the integer 0.
MULTI void i_subtract(WmlsFloat value) {
const FLOATVAL result = SELF.get_number()
- VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
@@ -324,12 +324,12 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_subtract(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -399,7 +399,7 @@ Return the integer 0.
MULTI void i_multiply(WmlsFloat value) {
const FLOATVAL result = SELF.get_number()
* VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
@@ -414,12 +414,12 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_multiply(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -489,35 +489,35 @@ Return the integer 0.
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(WmlsInteger value) {
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(WmlsBoolean value) {
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -530,20 +530,20 @@ Return the integer 0.
const FLOATVAL d = VTABLE_get_integer(INTERP, trans);
if (d != 0.0) {
const FLOATVAL result = SELF.get_number() / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -605,7 +605,7 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -616,7 +616,7 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -632,16 +632,16 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_floor_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -703,7 +703,7 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -714,7 +714,7 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -730,16 +730,16 @@ Return the integer 0.
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_modulus(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -778,11 +778,11 @@ Return the integer 0.
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
| VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -822,11 +822,11 @@ Return the integer 0.
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
& VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -866,11 +866,11 @@ Return the integer 0.
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
^ VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -910,11 +910,11 @@ Return the integer 0.
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
>> VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -954,11 +954,11 @@ Return the integer 0.
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
>> VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -998,11 +998,11 @@ Return the integer 0.
|| value->vtable->base_type == dynpmc_WmlsBoolean) {
const INTVAL result = SELF.get_integer()
<< VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
View
161 pmc/wmlsstring.pmc
@@ -80,16 +80,16 @@ Return the integer 2.
"->P", &trans);
if (trans->vtable->base_type == dynpmc_WmlsInvalid) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
else if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL a = VTABLE_get_integer(INTERP, trans);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(a);
}
else if (trans->vtable->base_type == dynpmc_WmlsFloat) {
const FLOATVAL a = VTABLE_get_number(INTERP, trans);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(a);
}
SELF.increment();
@@ -108,16 +108,16 @@ Return the integer 2.
"->P", &trans);
if (trans->vtable->base_type == dynpmc_WmlsInvalid) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
else if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL a = VTABLE_get_integer(INTERP, trans);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(a);
}
else if (trans->vtable->base_type == dynpmc_WmlsFloat) {
const FLOATVAL a = VTABLE_get_number(INTERP, trans);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(a);
}
SELF.decrement();
@@ -137,7 +137,7 @@ Return the integer 2.
}
VTABLE void i_absolute() {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -175,15 +175,15 @@ Return the integer 2.
"->P", &trans);
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(- VTABLE_get_integer(INTERP, trans));
}
else if (trans->vtable->base_type == dynpmc_WmlsFloat) {
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(- VTABLE_get_number(INTERP, trans));
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -217,11 +217,12 @@ Return the integer 2.
"->P", &trans);
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
- SELF.morph(dynpmc_WmlsInteger);
- SELF.set_integer_native(~ VTABLE_get_integer(INTERP, trans));
+ const INTVAL result = ~ VTABLE_get_integer(INTERP, trans);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
+ SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -242,7 +243,7 @@ Return the integer 2.
VTABLE void i_logical_not() {
const INTVAL result = ! SELF.get_bool();
- SELF.morph(dynpmc_WmlsBoolean);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsBoolean, 0);
SELF.set_bool(result);
}
@@ -322,7 +323,7 @@ Return the integer 2.
}
MULTI void i_add(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -422,18 +423,18 @@ Return the integer 2.
&& trans2->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = VTABLE_get_integer(INTERP, trans1)
- VTABLE_get_integer(INTERP, trans2);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else if (trans1->vtable->base_type != dynpmc_WmlsInvalid
&& trans2->vtable->base_type != dynpmc_WmlsInvalid) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans1)
- VTABLE_get_number(INTERP, trans2);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -445,11 +446,11 @@ Return the integer 2.
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
- VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -461,11 +462,11 @@ Return the integer 2.
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
- VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -477,16 +478,16 @@ Return the integer 2.
if (trans->vtable->base_type == dynpmc_WmlsFloat) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans)
- VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_subtract(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -586,18 +587,18 @@ Return the integer 2.
&& trans2->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = VTABLE_get_integer(INTERP, trans1)
* VTABLE_get_integer(INTERP, trans2);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else if (trans1->vtable->base_type != dynpmc_WmlsInvalid
&& trans2->vtable->base_type != dynpmc_WmlsInvalid) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans1)
* VTABLE_get_number(INTERP, trans2);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -609,11 +610,11 @@ Return the integer 2.
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
* VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -625,11 +626,11 @@ Return the integer 2.
if (trans->vtable->base_type == dynpmc_WmlsInteger) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
* VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -641,16 +642,16 @@ Return the integer 2.
if (trans->vtable->base_type == dynpmc_WmlsFloat) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans)
* VTABLE_get_number(INTERP, value);
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_multiply(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -751,15 +752,15 @@ Return the integer 2.
const FLOATVAL d = VTABLE_get_number(INTERP, trans2);
if (d != 0.0) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans1) / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -772,15 +773,15 @@ Return the integer 2.
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans) / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -793,15 +794,15 @@ Return the integer 2.
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans) / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -814,20 +815,20 @@ Return the integer 2.
const FLOATVAL d = VTABLE_get_number(INTERP, value);
if (d != 0.0) {
const FLOATVAL result = VTABLE_get_number(INTERP, trans) / d;
- SELF.morph(dynpmc_WmlsFloat);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsFloat, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -911,15 +912,15 @@ Return the integer 2.
const INTVAL d = VTABLE_get_integer(INTERP, trans2);
if (d != 0) {
const INTVAL result = VTABLE_get_integer(INTERP, trans1) / d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -932,15 +933,15 @@ Return the integer 2.
const INTVAL d = VTABLE_get_number(INTERP, value);
if (d != 0) {
const INTVAL result = VTABLE_get_integer(INTERP, trans) / d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -953,20 +954,20 @@ Return the integer 2.
const INTVAL d = VTABLE_get_number(INTERP, value);
if (d != 0) {
const INTVAL result = VTABLE_get_integer(INTERP, trans) / d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_floor_divide(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -1050,15 +1051,15 @@ Return the integer 2.
const INTVAL d = VTABLE_get_integer(INTERP, trans2);
if (d != 0) {
const INTVAL result = VTABLE_get_integer(INTERP, trans1) % d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1071,15 +1072,15 @@ Return the integer 2.
const INTVAL d = VTABLE_get_number(INTERP, value);
if (d != 0) {
const INTVAL result = VTABLE_get_integer(INTERP, trans) % d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1092,20 +1093,20 @@ Return the integer 2.
const INTVAL d = VTABLE_get_number(INTERP, value);
if (d != 0) {
const INTVAL result = VTABLE_get_integer(INTERP, trans) % d;
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_number_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
MULTI void i_modulus(DEFAULT value) {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
/*
@@ -1152,11 +1153,11 @@ Return the integer 2.
|| value->vtable->base_type == dynpmc_WmlsBoolean)) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
| VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1204,11 +1205,11 @@ Return the integer 2.
|| value->vtable->base_type == dynpmc_WmlsBoolean)) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
& VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1256,11 +1257,11 @@ Return the integer 2.
|| value->vtable->base_type == dynpmc_WmlsBoolean)) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
^ VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1308,11 +1309,11 @@ Return the integer 2.
|| value->vtable->base_type == dynpmc_WmlsBoolean)) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
>> VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1360,11 +1361,11 @@ Return the integer 2.
|| value->vtable->base_type == dynpmc_WmlsBoolean)) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
>> VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}
@@ -1412,11 +1413,11 @@ Return the integer 2.
|| value->vtable->base_type == dynpmc_WmlsBoolean)) {
const INTVAL result = VTABLE_get_integer(INTERP, trans)
<< VTABLE_get_integer(INTERP, value);
- SELF.morph(dynpmc_WmlsInteger);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInteger, 0);
SELF.set_integer_native(result);
}
else {
- SELF.morph(dynpmc_WmlsInvalid);
+ pmc_reuse(INTERP, SELF, dynpmc_WmlsInvalid, 0);
}
}

0 comments on commit f94c5bb

Please sign in to comment.