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

Unified Diff: src/stub-cache.cc

Issue 12207016: Split CompileCallConstant into logical parts for Frontend and Backend. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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/stub-cache.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 08ca3f6882bf05f3b5fc114b95808f2007d43d14..06b4782b767f4875a7fd271f3535a539c923715d 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -578,6 +578,14 @@ Handle<Code> StubCache::ComputeCallConstant(int argc,
check = BOOLEAN_CHECK;
}
+ if (check != RECEIVER_MAP_CHECK &&
+ !function->IsBuiltin() &&
+ function->shared()->is_classic_mode()) {
+ // Calling non-strict non-builtins with a value as the receiver
+ // requires boxing.
+ return Handle<Code>::null();
+ }
+
Code::Flags flags =
Code::ComputeMonomorphicFlags(kind, Code::CONSTANT_FUNCTION, extra_state,
cache_holder, argc);
@@ -587,7 +595,7 @@ Handle<Code> StubCache::ComputeCallConstant(int argc,
CallStubCompiler compiler(isolate_, argc, kind, extra_state, cache_holder);
Handle<Code> code =
- compiler.CompileCallConstant(object, holder, function, name, check);
+ compiler.CompileCallConstant(object, holder, name, check, function);
code->set_check_type(check);
ASSERT_EQ(flags, code->flags());
PROFILE(isolate_,
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698