Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 4222) |
+++ src/runtime.cc (working copy) |
@@ -1240,9 +1240,9 @@ |
static void SetCustomCallGenerator(Handle<JSFunction> function, |
- CustomCallGenerator generator) { |
+ ExternalReference* generator) { |
if (function->shared()->function_data()->IsUndefined()) { |
- function->shared()->set_function_data(*FromCData(generator)); |
+ function->shared()->set_function_data(*FromCData(generator->address())); |
} |
} |
@@ -1250,7 +1250,7 @@ |
static Handle<JSFunction> InstallBuiltin(Handle<JSObject> holder, |
const char* name, |
Builtins::Name builtin_name, |
- CustomCallGenerator generator = NULL) { |
+ ExternalReference* generator = NULL) { |
Handle<String> key = Factory::LookupAsciiSymbol(name); |
Handle<Code> code(Builtins::builtin(builtin_name)); |
Handle<JSFunction> optimized = Factory::NewFunction(key, |
@@ -1267,22 +1267,22 @@ |
} |
-static Object* CompileArrayPushCall(CallStubCompiler* compiler, |
- Object* object, |
- JSObject* holder, |
- JSFunction* function, |
- String* name, |
- StubCompiler::CheckType check) { |
+Object* CompileArrayPushCall(CallStubCompiler* compiler, |
+ Object* object, |
+ JSObject* holder, |
+ JSFunction* function, |
+ String* name, |
+ StubCompiler::CheckType check) { |
return compiler->CompileArrayPushCall(object, holder, function, name, check); |
} |
-static Object* CompileArrayPopCall(CallStubCompiler* compiler, |
- Object* object, |
- JSObject* holder, |
- JSFunction* function, |
- String* name, |
- StubCompiler::CheckType check) { |
+Object* CompileArrayPopCall(CallStubCompiler* compiler, |
+ Object* object, |
+ JSObject* holder, |
+ JSFunction* function, |
+ String* name, |
+ StubCompiler::CheckType check) { |
return compiler->CompileArrayPopCall(object, holder, function, name, check); |
} |
@@ -1292,8 +1292,11 @@ |
ASSERT(args.length() == 1); |
CONVERT_ARG_CHECKED(JSObject, holder, 0); |
- InstallBuiltin(holder, "pop", Builtins::ArrayPop, CompileArrayPopCall); |
- InstallBuiltin(holder, "push", Builtins::ArrayPush, CompileArrayPushCall); |
+ ExternalReference pop = ExternalReference::compile_array_pop_call(); |
+ ExternalReference push = ExternalReference::compile_array_push_call(); |
+ |
+ InstallBuiltin(holder, "pop", Builtins::ArrayPop, &pop); |
+ InstallBuiltin(holder, "push", Builtins::ArrayPush, &push); |
InstallBuiltin(holder, "shift", Builtins::ArrayShift); |
InstallBuiltin(holder, "unshift", Builtins::ArrayUnshift); |
InstallBuiltin(holder, "slice", Builtins::ArraySlice); |