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

Side by Side Diff: runtime/vm/native_entry.cc

Issue 251043003: Observatory Display PC descriptors with disassembling (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/native_entry.h" 5 #include "vm/native_entry.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 26 matching lines...) Expand all
37 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 37 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
38 Dart_NativeFunction native_function = 38 Dart_NativeFunction native_function =
39 resolver(Api::NewHandle(Isolate::Current(), function_name.raw()), 39 resolver(Api::NewHandle(Isolate::Current(), function_name.raw()),
40 number_of_arguments, auto_setup_scope); 40 number_of_arguments, auto_setup_scope);
41 Dart_ExitScope(); // Exit the Dart API scope. 41 Dart_ExitScope(); // Exit the Dart API scope.
42 return reinterpret_cast<NativeFunction>(native_function); 42 return reinterpret_cast<NativeFunction>(native_function);
43 } 43 }
44 44
45 45
46 const uint8_t* NativeEntry::ResolveSymbolInLibrary(const Library& library, 46 const uint8_t* NativeEntry::ResolveSymbolInLibrary(const Library& library,
47 uword pc) { 47 uword pc) {
48 if (library.native_entry_symbol_resolver() == 0) { 48 if (library.native_entry_symbol_resolver() == 0) {
49 // Cannot reverse lookup native entries. 49 // Cannot reverse lookup native entries.
50 return NULL; 50 return NULL;
51 } 51 }
52 Dart_NativeEntrySymbol symbol_resolver = 52 Dart_NativeEntrySymbol symbol_resolver =
53 library.native_entry_symbol_resolver(); 53 library.native_entry_symbol_resolver();
54 return symbol_resolver(reinterpret_cast<Dart_NativeFunction>(pc)); 54 return symbol_resolver(reinterpret_cast<Dart_NativeFunction>(pc));
55 } 55 }
56 56
57 57
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 state->set_reusable_scope(scope); 112 state->set_reusable_scope(scope);
113 } else { 113 } else {
114 ASSERT(state->reusable_scope() != scope); 114 ASSERT(state->reusable_scope() != scope);
115 delete scope; 115 delete scope;
116 } 116 }
117 DEOPTIMIZE_ALOT; 117 DEOPTIMIZE_ALOT;
118 VERIFY_ON_TRANSITION; 118 VERIFY_ON_TRANSITION;
119 } 119 }
120 120
121 } // namespace dart 121 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698