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) {
function SetupMath() {
// Setup math constants.
// ECMA-262, section 15.8.1.1.
%OptimizeObjectForAddingMultipleProperties($Math, 26);
%OptimizeObjectForAddingMultipleProperties($Math, 8);
%SetProperty($Math,
"E",
2.7182818284590452354,
......@@ -220,6 +220,7 @@ function SetupMath() {
"SQRT2",
1.4142135623730951,
DONT_ENUM | DONT_DELETE | READ_ONLY);
%TransformToFastProperties($Math);
// Setup non-enumerable functions of the Math object and
// set their names.
......
......@@ -457,8 +457,8 @@ function NumberToJSON(key) {
// ----------------------------------------------------------------------------
function SetupNumber() {
// Setup the constructor property on the Number prototype object.
%OptimizeObjectForAddingMultipleProperties($Number.prototype, 8);
// Setup the constructor property on the Number prototype object.
%SetProperty($Number.prototype, "constructor", $Number, DONT_ENUM);
%OptimizeObjectForAddingMultipleProperties($Number, 5);
......@@ -485,6 +485,7 @@ function SetupNumber() {
"POSITIVE_INFINITY",
1/0,
DONT_ENUM | DONT_DELETE | READ_ONLY);
%TransformToFastProperties($Number);
// Setup non-enumerable functions on the Number prototype object.
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