| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
| 6 | 6 |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 const Library& lib = Library::Handle(frame->Library()); | 248 const Library& lib = Library::Handle(frame->Library()); |
| 249 *library_id = lib.index(); | 249 *library_id = lib.index(); |
| 250 } | 250 } |
| 251 return Api::Success(); | 251 return Api::Success(); |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 DART_EXPORT Dart_Handle Dart_ActivationFrameGetLocation( | 255 DART_EXPORT Dart_Handle Dart_ActivationFrameGetLocation( |
| 256 Dart_ActivationFrame activation_frame, | 256 Dart_ActivationFrame activation_frame, |
| 257 Dart_Handle* function_name, | 257 Dart_Handle* function_name, |
| 258 Dart_Handle* function, |
| 258 Dart_CodeLocation* location) { | 259 Dart_CodeLocation* location) { |
| 259 // TODO(hausner): Implement a way to recognize when there | 260 // TODO(hausner): Implement a way to recognize when there |
| 260 // is no source code for the code in the frame. | 261 // is no source code for the code in the frame. |
| 261 Isolate* isolate = Isolate::Current(); | 262 Isolate* isolate = Isolate::Current(); |
| 262 DARTSCOPE(isolate); | 263 DARTSCOPE(isolate); |
| 263 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); | 264 CHECK_AND_CAST(ActivationFrame, frame, activation_frame); |
| 264 if (function_name != NULL) { | 265 if (function_name != NULL) { |
| 265 *function_name = Api::NewHandle(isolate, frame->QualifiedFunctionName()); | 266 *function_name = Api::NewHandle(isolate, frame->QualifiedFunctionName()); |
| 266 } | 267 } |
| 268 if (function != NULL) { |
| 269 *function = Api::NewHandle(isolate, frame->function().raw()); |
| 270 } |
| 267 | 271 |
| 268 if (location != NULL) { | 272 if (location != NULL) { |
| 269 location->script_url = Api::NewHandle(isolate, frame->SourceUrl()); | 273 location->script_url = Api::NewHandle(isolate, frame->SourceUrl()); |
| 270 const Library& lib = Library::Handle(frame->Library()); | 274 const Library& lib = Library::Handle(frame->Library()); |
| 271 location->library_id = lib.index(); | 275 location->library_id = lib.index(); |
| 272 location->token_pos = frame->TokenPos(); | 276 location->token_pos = frame->TokenPos(); |
| 273 } | 277 } |
| 274 return Api::Success(); | 278 return Api::Success(); |
| 275 } | 279 } |
| 276 | 280 |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 891 |
| 888 | 892 |
| 889 DART_EXPORT char* Dart_GetVmStatus(const char* request) { | 893 DART_EXPORT char* Dart_GetVmStatus(const char* request) { |
| 890 if (strncmp(request, "/isolate/", 9) == 0) { | 894 if (strncmp(request, "/isolate/", 9) == 0) { |
| 891 return Isolate::GetStatus(request); | 895 return Isolate::GetStatus(request); |
| 892 } | 896 } |
| 893 return NULL; | 897 return NULL; |
| 894 } | 898 } |
| 895 | 899 |
| 896 } // namespace dart | 900 } // namespace dart |
| OLD | NEW |