Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: src/runtime.cc

Issue 1981002: Refactored custom call IC generators: (Closed)
Patch Set: Review fixes. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 823889aced4b952183c336d3319fc43e27edf68e..b421ac714766082b7bcbecc7ae473495da6b4e40 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1325,18 +1325,9 @@ static Object* Runtime_FinishArrayPrototypeSetup(Arguments args) {
}
-static void SetCustomCallGenerator(Handle<JSFunction> function,
- ExternalReference* generator) {
- if (function->shared()->function_data()->IsUndefined()) {
- function->shared()->set_function_data(*FromCData(generator->address()));
- }
-}
-
-
static Handle<JSFunction> InstallBuiltin(Handle<JSObject> holder,
const char* name,
- Builtins::Name builtin_name,
- ExternalReference* generator = NULL) {
+ Builtins::Name builtin_name) {
Handle<String> key = Factory::LookupAsciiSymbol(name);
Handle<Code> code(Builtins::builtin(builtin_name));
Handle<JSFunction> optimized = Factory::NewFunction(key,
@@ -1345,44 +1336,18 @@ static Handle<JSFunction> InstallBuiltin(Handle<JSObject> holder,
code,
false);
optimized->shared()->DontAdaptArguments();
- if (generator != NULL) {
- SetCustomCallGenerator(optimized, generator);
- }
SetProperty(holder, key, optimized, NONE);
return optimized;
}
-Object* CompileArrayPushCall(CallStubCompiler* compiler,
- Object* object,
- JSObject* holder,
- JSFunction* function,
- String* name,
- StubCompiler::CheckType check) {
- return compiler->CompileArrayPushCall(object, holder, function, name, check);
-}
-
-
-Object* CompileArrayPopCall(CallStubCompiler* compiler,
- Object* object,
- JSObject* holder,
- JSFunction* function,
- String* name,
- StubCompiler::CheckType check) {
- return compiler->CompileArrayPopCall(object, holder, function, name, check);
-}
-
-
static Object* Runtime_SpecialArrayFunctions(Arguments args) {
HandleScope scope;
ASSERT(args.length() == 1);
CONVERT_ARG_CHECKED(JSObject, holder, 0);
- 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, "pop", Builtins::ArrayPop);
+ InstallBuiltin(holder, "push", Builtins::ArrayPush);
InstallBuiltin(holder, "shift", Builtins::ArrayShift);
InstallBuiltin(holder, "unshift", Builtins::ArrayUnshift);
InstallBuiltin(holder, "slice", Builtins::ArraySlice);
« no previous file with comments | « src/objects-inl.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698