"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.
}
-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);
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()) {
F(InitializeConstGlobal, 2, 1) \
F(InitializeConstContextSlot, 3, 1) \
F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
- F(TransformToFastProperties, 1, 1) \
\
/* Debugging */ \
F(DebugPrint, 1, 1) \
%FunctionSetName(f, key);
%SetProperty(object, key, f, attributes);
}
- %TransformToFastProperties(object);
+ %ToFastProperties(object);
}
// Emulates JSC by installing functions on a hidden prototype that
"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(