aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/big.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-01-22 16:24:00 +0100
committerSverker Eriksson <[email protected]>2014-01-22 16:24:00 +0100
commit1b904fd1fcec000efb33446859e75872dc00ef2b (patch)
treefd206af80968325baac60b6d9fa15ef5d4d4b296 /erts/emulator/beam/big.c
parentd8565ab63de970f01ec1bf80fcbf0b3c692c7bd0 (diff)
downloadotp-1b904fd1fcec000efb33446859e75872dc00ef2b.tar.gz
otp-1b904fd1fcec000efb33446859e75872dc00ef2b.tar.bz2
otp-1b904fd1fcec000efb33446859e75872dc00ef2b.zip
erts: Refactor big-float compare on HALFWORD to use C-stack
for the temporary conversion from float to big. Preparation for coming bugfix of 'big_buf' array size.
Diffstat (limited to 'erts/emulator/beam/big.c')
-rw-r--r--erts/emulator/beam/big.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c
index 2b27b111d8..4343c6cb4c 100644
--- a/erts/emulator/beam/big.c
+++ b/erts/emulator/beam/big.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1996-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1996-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -1603,6 +1603,8 @@ big_to_double(Wterm x, double* resp)
/*
* Logic has been copied from erl_bif_guard.c and slightly
* modified to use a static instead of dynamic heap
+ *
+ * HALFWORD: Return relative term with 'heap' as base.
*/
Eterm
double_to_big(double x, Eterm *heap)
@@ -1633,7 +1635,7 @@ double_to_big(double x, Eterm *heap)
sz = BIG_NEED_SIZE(ds); /* number of words including arity */
hp = heap;
- res = make_big(hp);
+ res = make_big_rel(hp, heap);
xp = (ErtsDigit*) (hp + 1);
for (i = ds - 1; i >= 0; i--) {