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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 26191002: Hook ByteArrayViewLoad operations into polymorphic inliner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index fdbaa09432fe3f15304a8b73025ff4daf761fbe7..e651328d601ef46e6fc93c3f115d4062743e870b 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -407,6 +407,28 @@ INLINE_WHITE_LIST(RECOGNIZE_FUNCTION)
}
+bool MethodRecognizer::PolymorphicTarget(const Function& function) {
+ const Class& function_class = Class::Handle(function.Owner());
+ const Library& lib = Library::Handle(function_class.library());
+ if (!IsRecognizedLibrary(lib)) {
+ return false;
+ }
+
+ const String& function_name = String::Handle(function.name());
+ const String& class_name = String::Handle(function_class.Name());
+
+#define RECOGNIZE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \
+ if (CompareNames(lib, #test_function_name, function_name) && \
+ CompareNames(lib, #test_class_name, class_name)) { \
+ ASSERT(function.CheckSourceFingerprint(fp)); \
+ return true; \
+ }
+POLYMORPHC_TARGET_LIST(RECOGNIZE_FUNCTION)
+#undef RECOGNIZE_FUNCTION
+ return false;
+}
+
+
const char* MethodRecognizer::KindToCString(Kind kind) {
#define KIND_TO_STRING(class_name, function_name, enum_name, fp) \
if (kind == k##enum_name) return #enum_name;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698