Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1104)

Unified Diff: src/js/math.js

Issue 2109483004: [builtins] Drop the special MathRandomRaw. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix off-by-one. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/collection.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/math.js
diff --git a/src/js/math.js b/src/js/math.js
index b8deafdee2166686f9cf96f5f37ffd660766e6fa..c8e8e4ea4735bebc8743bc433018d5fedb8637ac 100644
--- a/src/js/math.js
+++ b/src/js/math.js
@@ -47,14 +47,6 @@ function MathRandom() {
return randomNumbers[--nextRandomIndex];
}
-function MathRandomRaw() {
- if (nextRandomIndex <= kRandomNumberStart) {
- randomNumbers = %GenerateRandomNumbers(randomNumbers);
- nextRandomIndex = %_TypedArrayGetLength(randomNumbers);
- }
- return %_DoubleLo(randomNumbers[--nextRandomIndex]) & 0x3FFFFFFF;
-}
-
// ES6 draft 09-27-13, section 20.2.2.28.
function MathSign(x) {
x = +x;
@@ -142,7 +134,7 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [
utils.Export(function(to) {
to.MathAbs = MathAbs;
- to.IntRandom = MathRandomRaw;
+ to.MathRandom = MathRandom;
});
})
« no previous file with comments | « src/js/collection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698