[svn:parrot] r39405 - branches/pmc_i_ops/src/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Fri Jun 5 13:04:33 UTC 2009
Author: bacek
Date: Fri Jun 5 13:04:32 2009
New Revision: 39405
URL: https://trac.parrot.org/parrot/changeset/39405
Log:
[pmc] BigInt bitwise ops use i_ops now.
Modified:
branches/pmc_i_ops/src/pmc/bigint.pmc
Modified: branches/pmc_i_ops/src/pmc/bigint.pmc
==============================================================================
--- branches/pmc_i_ops/src/pmc/bigint.pmc Fri Jun 5 13:04:07 2009 (r39404)
+++ branches/pmc_i_ops/src/pmc/bigint.pmc Fri Jun 5 13:04:32 2009 (r39405)
@@ -1166,29 +1166,12 @@
*/
- MULTI PMC *bitwise_shl(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shl_bigint_int(INTERP, SELF,
- VTABLE_get_integer(INTERP, value),
- dest);
+ MULTI PMC *bitwise_shl(DEFAULT value, PMC *dest) {
+ dest = SELF.clone();
+ VTABLE_i_bitwise_shl(INTERP, dest, value);
return dest;
}
- MULTI PMC *bitwise_shl(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shl_bigint_int(INTERP, SELF,
- VTABLE_get_integer(interp, value), dest);
- return dest;
- }
- MULTI PMC *bitwise_shl(DEFAULT value, PMC *dest) {
- UNUSED(dest)
- Parrot_ex_throw_from_c_args(INTERP, NULL,
- EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
- "BigInt: no multiple dispatch variant 'bitwise_shl' for %Ss",
- VTABLE_name(interp, value));
- }
VTABLE PMC *bitwise_shl_int(INTVAL value, PMC *dest) {
dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
@@ -1238,29 +1221,10 @@
*/
- MULTI PMC *bitwise_shr(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shr_bigint_int(INTERP, SELF,
- VTABLE_get_integer(INTERP, value),
- dest);
- return dest;
- }
-
- MULTI PMC *bitwise_shr(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shr_bigint_int(INTERP, SELF,
- VTABLE_get_integer(interp, value), dest);
- return dest;
- }
-
MULTI PMC *bitwise_shr(DEFAULT value, PMC *dest) {
- UNUSED(dest)
- Parrot_ex_throw_from_c_args(INTERP, NULL,
- EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
- "BigInt: no multiple dispatch variant 'bitwise_shr' for %Ss",
- VTABLE_name(interp, value));
+ dest = SELF.clone();
+ VTABLE_i_bitwise_shr(INTERP, dest, value);
+ return dest;
}
VTABLE PMC *bitwise_shr_int(INTVAL value, PMC *dest) {
More information about the parrot-commits
mailing list