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

Unified Diff: runtime/vm/method_recognizer.cc

Issue 1134623004: - Use conditional code inclusion for the dart_no_snapshot and dart executables using the MACRO DART… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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/method_recognizer.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/method_recognizer.cc
===================================================================
--- runtime/vm/method_recognizer.cc (revision 45699)
+++ runtime/vm/method_recognizer.cc (working copy)
@@ -25,15 +25,21 @@
}
-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;
+ #enum_name,
+static const char* recognized_list_method_name[] = {
RECOGNIZED_LIST(KIND_TO_STRING)
+};
#undef KIND_TO_STRING
+
+const char* MethodRecognizer::KindToCString(Kind kind) {
+ if (kind > kUnknown && kind < kNumRecognizedMethods)
+ return recognized_list_method_name[kind];
return "?";
}
+#if defined(DART_NO_SNAPSHOT)
void MethodRecognizer::InitializeState() {
GrowableArray<Library*> libs(3);
libs.Add(&Library::ZoneHandle(Library::CoreLibrary()));
@@ -83,5 +89,6 @@
#undef SET_IS_POLYMORPHIC_TARGET
#undef SET_FUNCTION_BIT
}
+#endif // defined(DART_NO_SNAPSHOT).
} // namespace dart
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698