[svn:parrot] r45895 - branches/string_consting/src/ops
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Apr 22 11:32:15 UTC 2010
Author: bacek
Date: Thu Apr 22 11:32:14 2010
New Revision: 45895
URL: https://trac.parrot.org/parrot/changeset/45895
Log:
Consting strings in ops
Modified:
branches/string_consting/src/ops/bit.ops
branches/string_consting/src/ops/cmp.ops
branches/string_consting/src/ops/core.ops
branches/string_consting/src/ops/io.ops
Modified: branches/string_consting/src/ops/bit.ops
==============================================================================
--- branches/string_consting/src/ops/bit.ops Thu Apr 22 10:46:22 2010 (r45894)
+++ branches/string_consting/src/ops/bit.ops Thu Apr 22 11:32:14 2010 (r45895)
@@ -114,16 +114,16 @@
}
inline op bands(invar PMC, in STR) :base_core {
- STRING * const a = VTABLE_get_string(interp, $1);
+ const STRING * const a = VTABLE_get_string(interp, $1);
STRING * const b = Parrot_str_bitwise_and(interp, a, $2);
VTABLE_set_string_native(interp, $1, b);
}
inline op bands(invar PMC, invar PMC) :base_core {
- STRING * a = VTABLE_get_string(interp, $1);
- STRING * const b = VTABLE_get_string(interp, $2);
- a = Parrot_str_bitwise_and(interp, a, b);
- VTABLE_set_string_native(interp, $1, a);
+ const STRING * const a = VTABLE_get_string(interp, $1);
+ const STRING * const b = VTABLE_get_string(interp, $2);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_and(interp, a, b));
}
inline op bands(out STR, in STR, in STR) :base_core {
@@ -131,14 +131,14 @@
}
inline op bands(invar PMC, invar PMC, in STR) :base_core {
- STRING * const a = VTABLE_get_string(interp, $2);
+ const STRING * const a = VTABLE_get_string(interp, $2);
STRING * const b = Parrot_str_bitwise_and(interp, a, $3);
VTABLE_set_string_native(interp, $1, b);
}
inline op bands(invar PMC, invar PMC, invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $2);
- STRING * const b = VTABLE_get_string(interp, $3);
+ const STRING * const a = VTABLE_get_string(interp, $2);
+ const STRING * const b = VTABLE_get_string(interp, $3);
STRING * const c = Parrot_str_bitwise_and(interp, a, b);
VTABLE_set_string_native(interp, $1, c);
}
@@ -196,15 +196,15 @@
}
inline op bnots(invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $1);
- STRING * const b = Parrot_str_bitwise_not(interp, a);
- VTABLE_set_string_native(interp, $1, b);
+ const STRING * const a = VTABLE_get_string(interp, $1);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_not(interp, a));
}
inline op bnots(out PMC, invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $2);
- STRING * const b = Parrot_str_bitwise_not(interp, a);
- VTABLE_set_string_native(interp, $1, b);
+ const STRING * const a = VTABLE_get_string(interp, $2);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_not(interp, a));
}
########################################
@@ -284,16 +284,16 @@
}
inline op bors(invar PMC, in STR) :base_core {
- STRING * const a = VTABLE_get_string(interp, $1);
- STRING * const b = Parrot_str_bitwise_or(interp, a, $2);
- VTABLE_set_string_native(interp, $1, b);
+ const STRING * const a = VTABLE_get_string(interp, $1);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_or(interp, a, $2));
}
inline op bors(invar PMC, invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $1);
- STRING * const b = VTABLE_get_string(interp, $2);
- STRING * const c = Parrot_str_bitwise_or(interp, a, b);
- VTABLE_set_string_native(interp, $1, c);
+ const STRING * const a = VTABLE_get_string(interp, $1);
+ const STRING * const b = VTABLE_get_string(interp, $2);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_or(interp, a, b));
}
inline op bors(out STR, in STR, in STR) :base_core {
@@ -301,16 +301,16 @@
}
inline op bors(invar PMC, invar PMC, in STR) :base_core {
- STRING * const b = VTABLE_get_string(interp, $2);
- STRING * const c = Parrot_str_bitwise_or(interp, b, $3);
- VTABLE_set_string_native(interp, $1, c);
+ const STRING * const b = VTABLE_get_string(interp, $2);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_or(interp, b, $3));
}
inline op bors(invar PMC, invar PMC, invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $2);
- STRING * const b = VTABLE_get_string(interp, $3);
- STRING * const c = Parrot_str_bitwise_or(interp, a, b);
- VTABLE_set_string_native(interp, $1, c);
+ const STRING * const a = VTABLE_get_string(interp, $2);
+ const STRING * const b = VTABLE_get_string(interp, $3);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_or(interp, a, b));
}
########################################
@@ -584,16 +584,16 @@
}
inline op bxors(invar PMC, in STR) :base_core {
- STRING * const a = VTABLE_get_string(interp, $1);
- STRING * const b = Parrot_str_bitwise_xor(interp, a, $2);
- VTABLE_set_string_native(interp, $1, b);
+ const STRING * const a = VTABLE_get_string(interp, $1);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_xor(interp, a, $2));
}
inline op bxors(invar PMC, invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $1);
- STRING * const b = VTABLE_get_string(interp, $2);
- STRING * const c = Parrot_str_bitwise_xor(interp, a, b);
- VTABLE_set_string_native(interp, $1, c);
+ const STRING * const a = VTABLE_get_string(interp, $1);
+ const STRING * const b = VTABLE_get_string(interp, $2);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_xor(interp, a, b));
}
inline op bxors(out STR, in STR, in STR) :base_core {
@@ -601,16 +601,16 @@
}
inline op bxors(invar PMC, invar PMC, in STR) :base_core {
- STRING * const a = VTABLE_get_string(interp, $2);
- STRING * const b = Parrot_str_bitwise_xor(interp, a, $3);
- VTABLE_set_string_native(interp, $1, b);
+ const STRING * const a = VTABLE_get_string(interp, $2);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_xor(interp, a, $3));
}
inline op bxors(invar PMC, invar PMC, invar PMC) :base_core {
- STRING * const a = VTABLE_get_string(interp, $2);
- STRING * const b = VTABLE_get_string(interp, $3);
- STRING * const c = Parrot_str_bitwise_xor(interp, a, b);
- VTABLE_set_string_native(interp, $1, c);
+ const STRING * const a = VTABLE_get_string(interp, $2);
+ const STRING * const b = VTABLE_get_string(interp, $3);
+ VTABLE_set_string_native(interp, $1,
+ Parrot_str_bitwise_xor(interp, a, b));
}
=back
Modified: branches/string_consting/src/ops/cmp.ops
==============================================================================
--- branches/string_consting/src/ops/cmp.ops Thu Apr 22 10:46:22 2010 (r45894)
+++ branches/string_consting/src/ops/cmp.ops Thu Apr 22 11:32:14 2010 (r45895)
@@ -646,7 +646,7 @@
}
inline op cmp(out INT, invar PMC, in STR) :base_core {
- STRING* const l = VTABLE_get_string(interp, $2);
+ const STRING* const l = VTABLE_get_string(interp, $2);
$1 = Parrot_str_compare(interp, l, $3);
}
Modified: branches/string_consting/src/ops/core.ops
==============================================================================
--- branches/string_consting/src/ops/core.ops Thu Apr 22 10:46:22 2010 (r45894)
+++ branches/string_consting/src/ops/core.ops Thu Apr 22 11:32:14 2010 (r45895)
@@ -810,7 +810,7 @@
opcode_t *dest;
opcode_t * const ret = expr NEXT();
PMC * const resume = pmc_new(interp, enum_class_Continuation);
- STRING * const msg = PMC_IS_NULL($1) ? NULL : VTABLE_get_string(interp, $1);
+ const STRING * const msg = PMC_IS_NULL($1) ? NULL : VTABLE_get_string(interp, $1);
PMC * const exception =
Parrot_ex_build_exception(interp, EXCEPT_error, CONTROL_ERROR, msg);
Modified: branches/string_consting/src/ops/io.ops
==============================================================================
--- branches/string_consting/src/ops/io.ops Thu Apr 22 10:46:22 2010 (r45894)
+++ branches/string_consting/src/ops/io.ops Thu Apr 22 11:32:14 2010 (r45895)
@@ -202,7 +202,7 @@
op print(invar PMC) :base_io {
PMC * const p = $1;
- STRING * const s = (VTABLE_get_string(interp, p));
+ const STRING * const s = (VTABLE_get_string(interp, p));
if (s)
Parrot_io_putps(interp, _PIO_STDOUT(interp), s);
}
@@ -254,7 +254,7 @@
goto ADDRESS(handler);
}
else {
- STRING * const s = VTABLE_get_string(interp, p);
+ const STRING * const s = VTABLE_get_string(interp, p);
if (s)
Parrot_io_putps(interp, _PIO_STDOUT(interp), s);
Parrot_io_putps(interp, _PIO_STDOUT(interp), Parrot_str_new_constant(interp, "\n"));
@@ -294,7 +294,7 @@
op printerr(invar PMC) :base_io {
PMC * const p = $1;
- STRING * const s = (VTABLE_get_string(interp, p));
+ const STRING * const s = (VTABLE_get_string(interp, p));
if (s)
Parrot_io_putps(interp, _PIO_STDERR(interp), s);
}
@@ -335,7 +335,7 @@
op print(invar PMC, invar PMC) :base_io {
if ($2 && $1) {
- STRING * const s = VTABLE_get_string(interp, $2);
+ const STRING * const s = VTABLE_get_string(interp, $2);
Parrot_io_putps(interp, $1, s);
}
}
More information about the parrot-commits
mailing list