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

Unified Diff: runtime/bin/io_natives.cc

Issue 227433004: Add runtime and native entry tags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
Index: runtime/bin/io_natives.cc
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 86d7c2d8f22e121e93759de0143acdc4e89c6d63..e10bdd4557500d61e079c9c71358b5314de283aa 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -124,5 +124,17 @@ Dart_NativeFunction IONativeLookup(Dart_Handle name,
return NULL;
}
+
+const char* IONativeReverseLookup(Dart_NativeFunction nf) {
+ int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries);
+ for (int i = 0; i < num_entries; i++) {
+ struct NativeEntries* entry = &(IOEntries[i]);
+ if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) {
+ return entry->name_;
+ }
+ }
+ return NULL;
+}
+
} // namespace bin
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698