aboutsummaryrefslogtreecommitdiff
path: root/src/lj_opt_fold.c
diff options
context:
space:
mode:
authorMike Pall <mike>2012-08-25 23:02:29 +0200
committerMike Pall <mike>2012-08-25 23:02:29 +0200
commit4c882fe71406a923f07c8e9a0b9189036e0ba386 (patch)
tree22aa3995b5bdc2fce05ba17488799e67abc635ba /src/lj_opt_fold.c
parent653facd0d5c1a4f7eae43eefbf8148f57e28e606 (diff)
downloadluajit-4c882fe71406a923f07c8e9a0b9189036e0ba386.tar.gz
luajit-4c882fe71406a923f07c8e9a0b9189036e0ba386.tar.bz2
luajit-4c882fe71406a923f07c8e9a0b9189036e0ba386.zip
Replace strtod() with builtin string to number conversion.
Diffstat (limited to 'src/lj_opt_fold.c')
-rw-r--r--src/lj_opt_fold.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 2240f5db..8f1c8770 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -25,6 +25,7 @@
25#endif 25#endif
26#include "lj_carith.h" 26#include "lj_carith.h"
27#include "lj_vm.h" 27#include "lj_vm.h"
28#include "lj_strscan.h"
28 29
29/* Here's a short description how the FOLD engine processes instructions: 30/* Here's a short description how the FOLD engine processes instructions:
30** 31**
@@ -693,7 +694,7 @@ LJFOLD(STRTO KGC)
693LJFOLDF(kfold_strto) 694LJFOLDF(kfold_strto)
694{ 695{
695 TValue n; 696 TValue n;
696 if (lj_str_tonum(ir_kstr(fleft), &n)) 697 if (lj_strscan_num(ir_kstr(fleft), &n))
697 return lj_ir_knum(J, numV(&n)); 698 return lj_ir_knum(J, numV(&n));
698 return FAILFOLD; 699 return FAILFOLD;
699} 700}