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

Unified Diff: src/runtime.cc

Issue 1079012: Fix pop push optimization to work with partial snapshots (correct... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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
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);
« src/assembler.h ('K') | « src/ia32/stub-cache-ia32.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698