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

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
« no previous file with comments | « runtime/bin/builtin_gen_snapshot.cc ('k') | runtime/bin/builtin_nolib.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin_natives.cc
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index 9201f5cb5d0504fda556f1cc8594ed64aec9f706..858aa27b4e2d3ffba5c8dd43d04473609c79b22e 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 uint8_t* Builtin::NativeSymbol(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 reinterpret_cast<const uint8_t*>(entry->name_);
+ }
+ }
+ return IONativeSymbol(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) {
« no previous file with comments | « runtime/bin/builtin_gen_snapshot.cc ('k') | runtime/bin/builtin_nolib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698