Reviewers: Yang,

Message:
PTAQL.

Description:
Convert array index to integer when computing pause distribution for
spinning-balls.


BUG=
TEST=


Please review this at http://codereview.chromium.org/8430006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M benchmarks/spinning-balls/v.js


Index: benchmarks/spinning-balls/v.js
diff --git a/benchmarks/spinning-balls/v.js b/benchmarks/spinning-balls/v.js
index bd009738872740a9a1de2fe02949439479d1749a..d8a5e2a156e58e99ceb48adebdda5e51caf1aa96 100644
--- a/benchmarks/spinning-balls/v.js
+++ b/benchmarks/spinning-balls/v.js
@@ -353,8 +353,8 @@ function updateStats(pause) {
   if (pause > 20) {
     sumOfSquaredPauses += (pause - 20) * (pause - 20);
   }
-  pauseDistribution[pause / 10] |= 0;
-  pauseDistribution[pause / 10]++;
+  pauseDistribution[Math.floor(pause / 10)] |= 0;
+  pauseDistribution[Math.floor(pause / 10)]++;
 }




--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to