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

Unified Diff: src/ast.cc

Issue 5767002: Merge math function ids and custom call generator ids. (Closed)
Patch Set: arm and x64 fixes. Created 10 years 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/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index c1ea0a8b3df790a271143bd8044e09b7964dfc5f..167322ac33e2cb05cf66c65b17b5ebe65eed2ea4 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -32,6 +32,7 @@
#include "parser.h"
#include "scopes.h"
#include "string-stream.h"
+#include "stub-cache.h"
namespace v8 {
namespace internal {
@@ -558,16 +559,18 @@ void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
static bool CallWithoutIC(Handle<JSFunction> target, int arity) {
+ SharedFunctionInfo* info = target->shared();
if (target->NeedsArgumentsAdaption()) {
// If the number of formal parameters of the target function
// does not match the number of arguments we're passing, we
// don't want to deal with it.
- return target->shared()->formal_parameter_count() == arity;
+ return info->formal_parameter_count() == arity;
} else {
// If the target doesn't need arguments adaption, we can call
// it directly, but we avoid to do so if it has a custom call
// generator, because that is likely to generate better code.
- return !target->shared()->HasCustomCallGenerator();
+ return !info->HasBuiltinFunctionId() ||
+ !CallStubCompiler::HasCustomCallGenerator(info->builtin_function_id());
}
}
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/bootstrapper.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698