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

Unified Diff: runtime/bin/builtin_gen_snapshot.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.cc ('k') | runtime/bin/builtin_natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin_gen_snapshot.cc
diff --git a/runtime/bin/builtin_gen_snapshot.cc b/runtime/bin/builtin_gen_snapshot.cc
index 965a86280552f2432bb322d2e1766b9fa85c0a78..3e25004ec2c9d9fe669d66aab57d8ae2afb0a942 100644
--- a/runtime/bin/builtin_gen_snapshot.cc
+++ b/runtime/bin/builtin_gen_snapshot.cc
@@ -49,6 +49,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 NULL;
+}
+
+
// 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.cc ('k') | runtime/bin/builtin_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698