Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 2674) |
+++ src/runtime.cc (working copy) |
@@ -1022,6 +1022,30 @@ |
} |
+static Object* Runtime_OptimizeObjectForAddingMultipleProperties( |
+ Arguments args) { |
+ HandleScope scope; |
+ ASSERT(args.length() == 2); |
+ CONVERT_ARG_CHECKED(JSObject, object, 0); |
+ CONVERT_SMI_CHECKED(properties, args[1]); |
+ if (object->HasFastProperties()) { |
+ NormalizeProperties(object, KEEP_INOBJECT_PROPERTIES, properties); |
+ } |
+ 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) { |
HandleScope scope; |
ASSERT(args.length() == 4); |