aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-30 14:20:48 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-30 14:20:58 -0800
commit2aa334869496781389ad531f1811830ca7d61799 (patch)
treeee0c293c71be6aa04f4c19e896f832b5b3add9c4 /src/library.js
parent602d114eaab01aef167159aedba7d5bbfc634eef (diff)
asmify rand
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library.js b/src/library.js
index 20cb64f4..30453137 100644
--- a/src/library.js
+++ b/src/library.js
@@ -3454,7 +3454,6 @@ LibraryManager.library = {
},
rand_r__sig: 'ii',
rand_r__asm: true,
- rand_r__deps: ['__rand_seed'],
rand_r: function(seedp) {
seedp = seedp|0;
var val = 0;
@@ -3462,9 +3461,11 @@ LibraryManager.library = {
{{{ makeSetValueAsm('seedp', 0, 'val', 'i32') }}};
return val|0;
},
- rand__deps: ['rand_r'],
+ rand__sig: 'i',
+ rand__asm: true,
+ rand__deps: ['rand_r', '__rand_seed'],
rand: function() {
- return _rand_r(___rand_seed);
+ return _rand_r(___rand_seed)|0;
},
drand48: function() {