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

Unified Diff: runtime/vm/intrinsifier.cc

Issue 11358047: Add is_intrinsic and is_not_intrinsic bits to prevent repeated tests on the same function (inlining… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier.cc
===================================================================
--- runtime/vm/intrinsifier.cc (revision 14433)
+++ runtime/vm/intrinsifier.cc (working copy)
@@ -69,6 +69,9 @@
bool Intrinsifier::CanIntrinsify(const Function& function) {
if (!FLAG_intrinsify) return false;
+ // Intrinsic kind is set lazily below.
+ if (function.intrinsic_kind() == Function::kIsIntrinsic) return true;
+ if (function.intrinsic_kind() == Function::kIsNotIntrinsic) return false;
// Closure functions may have different arguments.
if (function.IsClosureFunction()) return false;
siva 2012/11/01 23:04:06 Should we do the closure function check first beca
srdjan 2012/11/01 23:08:18 Done.
const char* function_name = String::Handle(function.name()).ToCString();
@@ -89,11 +92,13 @@
if (TestFunction(function, \
class_name, function_name, \
#test_class_name, #test_function_name)) { \
+ function.set_intrinsic_kind(Function::kIsIntrinsic); \
return true; \
} \
INTRINSIC_LIST(FIND_INTRINSICS);
#undef FIND_INTRINSICS
+ function.set_intrinsic_kind(Function::kIsNotIntrinsic);
return false;
}
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698