Revision: 3886
Author: [email protected]
Date: Wed Feb 17 03:26:00 2010
Log: Remove duplicate function from runtime.
Review URL: http://codereview.chromium.org/620003
http://code.google.com/p/v8/source/detail?r=3886

Modified:
 /branches/bleeding_edge/src/math.js
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/src/runtime.h
 /branches/bleeding_edge/src/v8natives.js

=======================================
--- /branches/bleeding_edge/src/math.js Wed Jan  6 06:40:21 2010
+++ /branches/bleeding_edge/src/math.js Wed Feb 17 03:26:00 2010
@@ -233,7 +233,7 @@
                "SQRT2",
                1.4142135623730951,
                DONT_ENUM |  DONT_DELETE | READ_ONLY);
-  %TransformToFastProperties($Math);
+  %ToFastProperties($Math);

   // Setup non-enumerable functions of the Math object and
   // set their names.
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Wed Feb 17 00:26:50 2010
+++ /branches/bleeding_edge/src/runtime.cc      Wed Feb 17 03:26:00 2010
@@ -1206,17 +1206,6 @@
   }
   return *object;
 }
-
-
-static Object* Runtime_TransformToFastProperties(Arguments args) {
-  HandleScope scope;
-  ASSERT(args.length() == 1);
-  CONVERT_ARG_CHECKED(JSObject, object, 0);
-  if (!object->HasFastProperties() && !object->IsGlobalObject()) {
-    TransformToFastProperties(object, 0);
-  }
-  return *object;
-}


 static Object* Runtime_RegExpExec(Arguments args) {
@@ -3520,17 +3509,23 @@


 static Object* Runtime_ToFastProperties(Arguments args) {
+  HandleScope scope;
+
   ASSERT(args.length() == 1);
   Handle<Object> object = args.at<Object>(0);
   if (object->IsJSObject()) {
     Handle<JSObject> js_object = Handle<JSObject>::cast(object);
-    js_object->TransformToFastProperties(0);
+    if (!js_object->HasFastProperties() && !js_object->IsGlobalObject()) {
+      js_object->TransformToFastProperties(0);
+    }
   }
   return *object;
 }


 static Object* Runtime_ToSlowProperties(Arguments args) {
+  HandleScope scope;
+
   ASSERT(args.length() == 1);
   Handle<Object> object = args.at<Object>(0);
   if (object->IsJSObject()) {
=======================================
--- /branches/bleeding_edge/src/runtime.h       Wed Feb 17 00:26:50 2010
+++ /branches/bleeding_edge/src/runtime.h       Wed Feb 17 03:26:00 2010
@@ -266,7 +266,6 @@
   F(InitializeConstGlobal, 2, 1) \
   F(InitializeConstContextSlot, 3, 1) \
   F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
-  F(TransformToFastProperties, 1, 1) \
   \
   /* Debugging */ \
   F(DebugPrint, 1, 1) \
=======================================
--- /branches/bleeding_edge/src/v8natives.js    Tue Feb 16 02:08:39 2010
+++ /branches/bleeding_edge/src/v8natives.js    Wed Feb 17 03:26:00 2010
@@ -56,7 +56,7 @@
     %FunctionSetName(f, key);
     %SetProperty(object, key, f, attributes);
   }
-  %TransformToFastProperties(object);
+  %ToFastProperties(object);
 }

 // Emulates JSC by installing functions on a hidden prototype that
@@ -914,7 +914,7 @@
                "POSITIVE_INFINITY",
                1/0,
                DONT_ENUM | DONT_DELETE | READ_ONLY);
-  %TransformToFastProperties($Number);
+  %ToFastProperties($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