Remove duplicate function from runtime.
Review URL: http://codereview.chromium.org/620003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3886 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
be21c71584
commit
1684b2d9ac
@ -233,7 +233,7 @@ function SetupMath() {
|
||||
"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.
|
||||
|
@ -1208,17 +1208,6 @@ static Object* Runtime_OptimizeObjectForAddingMultipleProperties(
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
@ -3520,17 +3509,23 @@ static Object* Runtime_GetArgumentsProperty(Arguments args) {
|
||||
|
||||
|
||||
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()) {
|
||||
|
@ -266,7 +266,6 @@ namespace internal {
|
||||
F(InitializeConstGlobal, 2, 1) \
|
||||
F(InitializeConstContextSlot, 3, 1) \
|
||||
F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
|
||||
F(TransformToFastProperties, 1, 1) \
|
||||
\
|
||||
/* Debugging */ \
|
||||
F(DebugPrint, 1, 1) \
|
||||
|
@ -56,7 +56,7 @@ function InstallFunctions(object, attributes, functions) {
|
||||
%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 @@ function SetupNumber() {
|
||||
"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(
|
||||
|
Loading…
Reference in New Issue
Block a user