summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-13 15:38:18 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-13 15:38:18 +0900
commit6a5019d37fd595abd9e8297bb3d35a1ee054becf (patch)
treec9c021c80d5d9f0ccf940f07c487264ac167fea5 /include
parent38941772333d5d9298b76dfc8a97c5b076daedc2 (diff)
downloadmruby-6a5019d37fd595abd9e8297bb3d35a1ee054becf.tar.gz
mruby-6a5019d37fd595abd9e8297bb3d35a1ee054becf.zip
optimized OP_{ADD,SUB,MUL,DIV} to use numeric function for fixnums to handle overflow
Diffstat (limited to 'include')
-rw-r--r--include/mruby/numeric.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h
index 1bea51152..95792e9a6 100644
--- a/include/mruby/numeric.h
+++ b/include/mruby/numeric.h
@@ -22,6 +22,11 @@ mrb_value mrb_flt2big(mrb_state *mrb, mrb_float d);
void mrb_num_zerodiv(mrb_state *mrb);
mrb_value mrb_fix2str(mrb_state *mrb, mrb_value x, int base);
+mrb_value mrb_fixnum_plus(mrb_state *mrb, mrb_value x, mrb_value y);
+mrb_value mrb_fixnum_minus(mrb_state *mrb, mrb_value x, mrb_value y);
+mrb_value mrb_fixnum_mul(mrb_state *mrb, mrb_value x, mrb_value y);
+mrb_value mrb_num_div(mrb_state *mrb, mrb_value x, mrb_value y);
+
#if defined(__cplusplus)
} /* extern "C" { */
#endif