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

Unified Diff: runtime/bin/builtin_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/builtin_natives.cc
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 9201f5cb5d0504fda556f1cc8594ed64aec9f706..cec9badfe879a29e29401759a522f7d6621d0a9f 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -99,6 +99,18 @@ Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
}
+const char* Builtin::NativeReverseLookup(Dart_NativeFunction nf) {
+ int num_entries = sizeof(BuiltinEntries) / sizeof(struct NativeEntries);
+ for (int i = 0; i < num_entries; i++) {
+ struct NativeEntries* entry = &(BuiltinEntries[i]);
+ if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) {
+ return entry->name_;
+ }
+ }
+ return IONativeReverseLookup(nf);
+}
+
+
// Implementation of native functions which are used for some
// test/debug functionality in standalone dart mode.
void FUNCTION_NAME(Logger_PrintString)(Dart_NativeArguments args) {

Powered by Google App Engine
This is Rietveld 408576698