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

Unified Diff: src/math.js

Issue 1053143005: Collect type feedback on result of Math.[round|ceil|floor] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: MIPS port Created 5 years, 7 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/ic/ic.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/math.js
diff --git a/src/math.js b/src/math.js
index 1a5a1056f83c9f88d5a3e2c0fbca920de76ff990..13bcf0f655a114a0b29423d4149390ecce9ac0de 100644
--- a/src/math.js
+++ b/src/math.js
@@ -52,7 +52,7 @@ function MathAtan2JS(y, x) {
// ECMA 262 - 15.8.2.6
function MathCeil(x) {
- return -%_MathFloor(-x);
+ return -MathFloorJS(-x);
}
// ECMA 262 - 15.8.2.8
@@ -62,7 +62,7 @@ function MathExp(x) {
// ECMA 262 - 15.8.2.9
function MathFloorJS(x) {
- return %_MathFloor(+x);
+ return %MathFloor(+x);
}
// ECMA 262 - 15.8.2.10
@@ -167,8 +167,8 @@ function MathSign(x) {
// ES6 draft 09-27-13, section 20.2.2.34.
function MathTrunc(x) {
x = +x;
- if (x > 0) return %_MathFloor(x);
- if (x < 0) return -%_MathFloor(-x);
+ if (x > 0) return MathFloorJS(x);
+ if (x < 0) return -MathFloorJS(-x);
// -0, 0 or NaN.
return x;
}
« no previous file with comments | « src/ic/ic.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698