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

Unified Diff: src/js/v8natives.js

Issue 1573243009: [builtins] Migrate Number constructor similar to String constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index f4132f0faf47408060a229e4a3ffa7af3bbe00da..278ae9b57ed9ba0038063535bc4ee2be4084ad65 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -952,18 +952,6 @@ utils.InstallFunctions(GlobalBoolean.prototype, DONT_ENUM, [
// ----------------------------------------------------------------------------
// Number
-function NumberConstructor(x) {
- // TODO(bmeurer): Move this to toplevel.
- "use strict";
- var value = %_ArgumentsLength() == 0 ? 0 : TO_NUMBER(x);
- if (IS_UNDEFINED(new.target)) return value;
-
- var result = %NewObject(GlobalNumber, new.target);
- %_SetValueOf(result, value);
- return result;
-}
-
-
// ES6 Number.prototype.toString([ radix ])
function NumberToStringJS(radix) {
// NOTE: Both Number objects and values can enter here as
@@ -1114,7 +1102,6 @@ function NumberIsSafeInteger(number) {
// ----------------------------------------------------------------------------
-%SetCode(GlobalNumber, NumberConstructor);
%FunctionSetPrototype(GlobalNumber, new GlobalNumber(0));
%OptimizeObjectForAddingMultipleProperties(GlobalNumber.prototype, 8);

Powered by Google App Engine
This is Rietveld 408576698