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

Unified Diff: runtime/vm/intrinsifier.cc

Issue 10952002: Reapply "Deoptimization support in inlined code." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « runtime/vm/intrinsifier.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier.cc
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index efcb13690c51d032b0796aae35ce7a0ebf899107..abeef01f0e255700ac257c79a1f6ac29a0c541da 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -50,7 +50,7 @@ static bool TestFunction(const Function& function,
}
-bool Intrinsifier::Intrinsify(const Function& function, Assembler* assembler) {
+bool Intrinsifier::CanIntrinsify(const Function& function) {
if (!FLAG_intrinsify) return false;
// Closure functions may have different arguments.
if (function.IsClosureFunction()) return false;
@@ -70,6 +70,23 @@ bool Intrinsifier::Intrinsify(const Function& function, Assembler* assembler) {
if (TestFunction(function, \
class_name, function_name, \
#test_class_name, #test_function_name)) { \
+ return true; \
+ } \
+
+INTRINSIC_LIST(FIND_INTRINSICS);
+#undef FIND_INTRINSICS
+ return false;
+}
+
+bool Intrinsifier::Intrinsify(const Function& function, Assembler* assembler) {
+ if (!CanIntrinsify(function)) return false;
+ const char* function_name = String::Handle(function.name()).ToCString();
+ const Class& function_class = Class::Handle(function.Owner());
+ const char* class_name = String::Handle(function_class.Name()).ToCString();
+#define FIND_INTRINSICS(test_class_name, test_function_name, destination) \
+ if (TestFunction(function, \
+ class_name, function_name, \
+ #test_class_name, #test_function_name)) { \
return destination(assembler); \
} \
« no previous file with comments | « runtime/vm/intrinsifier.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698