[svn:parrot] r43938 - trunk/src/ops
fperrad at svn.parrot.org
fperrad at svn.parrot.org
Sat Feb 13 17:18:51 UTC 2010
Author: fperrad
Date: Sat Feb 13 17:18:50 2010
New Revision: 43938
URL: https://trac.parrot.org/parrot/changeset/43938
Log:
the opcode pow must honor HLL types
Modified:
trunk/src/ops/math.ops
Modified: trunk/src/ops/math.ops
==============================================================================
--- trunk/src/ops/math.ops Sat Feb 13 16:17:24 2010 (r43937)
+++ trunk/src/ops/math.ops Sat Feb 13 17:18:50 2010 (r43938)
@@ -816,7 +816,7 @@
const FLOATVAL b = VTABLE_get_number(interp, $3);
const FLOATVAL c = pow(a, b);
if (PMC_IS_NULL($1))
- $1 = pmc_new(interp, enum_class_Float);
+ $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
else
$1 = pmc_new(interp, $1->vtable->base_type);
VTABLE_set_number_native(interp, $1, c);
@@ -827,7 +827,7 @@
const FLOATVAL b = (FLOATVAL)$3;
const FLOATVAL c = pow(a, b);
if (PMC_IS_NULL($1))
- $1 = pmc_new(interp, enum_class_Float);
+ $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
else
$1 = pmc_new(interp, $1->vtable->base_type);
VTABLE_set_number_native(interp, $1, c);
@@ -837,7 +837,7 @@
const FLOATVAL a = VTABLE_get_number(interp, $2);
const FLOATVAL c = pow(a, $3);
if (PMC_IS_NULL($1))
- $1 = pmc_new(interp, enum_class_Float);
+ $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
else
$1 = pmc_new(interp, $1->vtable->base_type);
VTABLE_set_number_native(interp, $1, c);
More information about the parrot-commits
mailing list