Revision: 2684
Author: [email protected]
Date: Thu Aug 13 07:04:49 2009
Log: 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
http://code.google.com/p/v8/source/detail?r=2684

Modified:
  /branches/bleeding_edge/src/math.js
  /branches/bleeding_edge/src/v8natives.js

=======================================
--- /branches/bleeding_edge/src/math.js Thu Aug 13 05:35:59 2009
+++ /branches/bleeding_edge/src/math.js Thu Aug 13 07:04:49 2009
@@ -184,7 +184,7 @@
  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 @@
                 "SQRT2",
                 1.4142135623730951,
                 DONT_ENUM |  DONT_DELETE | READ_ONLY);
+  %TransformToFastProperties($Math);

    // Setup non-enumerable functions of the Math object and
    // set their names.
=======================================
--- /branches/bleeding_edge/src/v8natives.js    Thu Aug 13 05:35:59 2009
+++ /branches/bleeding_edge/src/v8natives.js    Thu Aug 13 07:04:49 2009
@@ -457,8 +457,8 @@
  //  
----------------------------------------------------------------------------

  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 @@
                 "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(

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to