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

Unified Diff: runtime/include/dart_api.h

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
« no previous file with comments | « runtime/bin/test_extension.c ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 9046ec822d57c4afd0c322fc590eced00dbd35db..76cab8aaa54ca7cff7a7ada1812b62ecbd9573dd 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -2212,6 +2212,24 @@ typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name,
/* TODO(turnidge): Consider renaming to NativeFunctionResolver or
* NativeResolver. */
+/**
+ * Native entry symbol lookup callback.
+ *
+ * For libraries and scripts which have native functions, the embedder
+ * can provide a callback for mapping a native entry to a symbol. This callback
+ * maps a native function entry PC to the native function name. If no native
+ * entry symbol can be found, the callback should return NULL.
+ *
+ * The parameters to the native reverse resolver function are:
+ * \param nf A Dart_NativeFunction.
+ *
+ * \return A const UTF-8 string containing the symbol name or NULL.
+ *
+ * See Dart_SetNativeResolver.
+ */
+typedef const uint8_t* (*Dart_NativeEntrySymbol)(Dart_NativeFunction nf);
+
+
/*
* ===========
* Environment
@@ -2248,7 +2266,8 @@ DART_EXPORT Dart_Handle Dart_SetEnvironmentCallback(
*/
DART_EXPORT Dart_Handle Dart_SetNativeResolver(
Dart_Handle library,
- Dart_NativeEntryResolver resolver);
+ Dart_NativeEntryResolver resolver,
+ Dart_NativeEntrySymbol symbol);
/* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */
« no previous file with comments | « runtime/bin/test_extension.c ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698