Commit 9373ca76 authored by whesse@chromium.org's avatar whesse@chromium.org

erikcorry: Remember to put objects back in fast case after adding functions.

P.S. for reasons unknown the original change (2681), also by erikcorry,
was attributed to Bill.
Review URL: http://codereview.chromium.org/164479

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 66fe1138
...@@ -184,7 +184,7 @@ function MathTan(x) { ...@@ -184,7 +184,7 @@ function MathTan(x) {
function SetupMath() { function SetupMath() {
// Setup math constants. // Setup math constants.
// ECMA-262, section 15.8.1.1. // ECMA-262, section 15.8.1.1.
%OptimizeObjectForAddingMultipleProperties($Math, 26); %OptimizeObjectForAddingMultipleProperties($Math, 8);
%SetProperty($Math, %SetProperty($Math,
"E", "E",
2.7182818284590452354, 2.7182818284590452354,
...@@ -220,6 +220,7 @@ function SetupMath() { ...@@ -220,6 +220,7 @@ function SetupMath() {
"SQRT2", "SQRT2",
1.4142135623730951, 1.4142135623730951,
DONT_ENUM | DONT_DELETE | READ_ONLY); DONT_ENUM | DONT_DELETE | READ_ONLY);
%TransformToFastProperties($Math);
// Setup non-enumerable functions of the Math object and // Setup non-enumerable functions of the Math object and
// set their names. // set their names.
......
...@@ -457,8 +457,8 @@ function NumberToJSON(key) { ...@@ -457,8 +457,8 @@ function NumberToJSON(key) {
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
function SetupNumber() { function SetupNumber() {
// Setup the constructor property on the Number prototype object.
%OptimizeObjectForAddingMultipleProperties($Number.prototype, 8); %OptimizeObjectForAddingMultipleProperties($Number.prototype, 8);
// Setup the constructor property on the Number prototype object.
%SetProperty($Number.prototype, "constructor", $Number, DONT_ENUM); %SetProperty($Number.prototype, "constructor", $Number, DONT_ENUM);
%OptimizeObjectForAddingMultipleProperties($Number, 5); %OptimizeObjectForAddingMultipleProperties($Number, 5);
...@@ -485,6 +485,7 @@ function SetupNumber() { ...@@ -485,6 +485,7 @@ function SetupNumber() {
"POSITIVE_INFINITY", "POSITIVE_INFINITY",
1/0, 1/0,
DONT_ENUM | DONT_DELETE | READ_ONLY); DONT_ENUM | DONT_DELETE | READ_ONLY);
%TransformToFastProperties($Number);
// Setup non-enumerable functions on the Number prototype object. // Setup non-enumerable functions on the Number prototype object.
InstallFunctions($Number.prototype, DONT_ENUM, $Array( InstallFunctions($Number.prototype, DONT_ENUM, $Array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment