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

Unified Diff: src/runtime.cc

Issue 11465005: Fix spec violations in methods of Number.prototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | « no previous file | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 9f5e78d5c14331f37014593ef3aebe3cc8346d6e..d25368e0f3aedbdd0577cae82ff8eb77f074c114 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -3807,15 +3807,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToFixed) {
ASSERT(args.length() == 2);
CONVERT_DOUBLE_ARG_CHECKED(value, 0);
- if (isnan(value)) {
- return *isolate->factory()->nan_symbol();
- }
- if (isinf(value)) {
- if (value < 0) {
- return *isolate->factory()->minus_infinity_symbol();
- }
- return *isolate->factory()->infinity_symbol();
- }
CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
int f = FastD2IChecked(f_number);
RUNTIME_ASSERT(f >= 0);
@@ -3832,15 +3823,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToExponential) {
ASSERT(args.length() == 2);
CONVERT_DOUBLE_ARG_CHECKED(value, 0);
- if (isnan(value)) {
- return *isolate->factory()->nan_symbol();
- }
- if (isinf(value)) {
- if (value < 0) {
- return *isolate->factory()->minus_infinity_symbol();
- }
- return *isolate->factory()->infinity_symbol();
- }
CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
int f = FastD2IChecked(f_number);
RUNTIME_ASSERT(f >= -1 && f <= 20);
@@ -3857,15 +3839,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NumberToPrecision) {
ASSERT(args.length() == 2);
CONVERT_DOUBLE_ARG_CHECKED(value, 0);
- if (isnan(value)) {
- return *isolate->factory()->nan_symbol();
- }
- if (isinf(value)) {
- if (value < 0) {
- return *isolate->factory()->minus_infinity_symbol();
- }
- return *isolate->factory()->infinity_symbol();
- }
CONVERT_DOUBLE_ARG_CHECKED(f_number, 1);
int f = FastD2IChecked(f_number);
RUNTIME_ASSERT(f >= 1 && f <= 21);
« no previous file with comments | « no previous file | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698