| 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 if (signature != NULL) { | 690 if (signature != NULL) { |
| 691 *signature = Api::NewHandle(isolate, func.UserVisibleSignature()); | 691 *signature = Api::NewHandle(isolate, func.UserVisibleSignature()); |
| 692 } | 692 } |
| 693 | 693 |
| 694 if (location != NULL) { | 694 if (location != NULL) { |
| 695 if (func.token_pos() >= 0) { | 695 if (func.token_pos() >= 0) { |
| 696 const Class& cls = Class::Handle(func.origin()); | 696 const Class& cls = Class::Handle(func.origin()); |
| 697 ASSERT(!cls.IsNull()); | 697 ASSERT(!cls.IsNull()); |
| 698 const Library& lib = Library::Handle(isolate, cls.library()); | 698 const Library& lib = Library::Handle(isolate, cls.library()); |
| 699 ASSERT(!lib.IsNull()); | 699 ASSERT(!lib.IsNull()); |
| 700 const Script& script = Script::Handle(cls.script()); | 700 // Note func.script() is not the same as cls.script() for eval functions. |
| 701 const Script& script = Script::Handle(func.script()); |
| 701 ASSERT(!script.IsNull()); | 702 ASSERT(!script.IsNull()); |
| 702 location->script_url = Api::NewHandle(isolate, script.url()); | 703 location->script_url = Api::NewHandle(isolate, script.url()); |
| 703 location->library_id = lib.index(); | 704 location->library_id = lib.index(); |
| 704 location->token_pos = func.token_pos(); | 705 location->token_pos = func.token_pos(); |
| 705 } else { | 706 } else { |
| 706 location->script_url = Api::NewHandle(isolate, String::null()); | 707 location->script_url = Api::NewHandle(isolate, String::null()); |
| 707 location->library_id = -1; | 708 location->library_id = -1; |
| 708 location->token_pos = -1; | 709 location->token_pos = -1; |
| 709 } | 710 } |
| 710 } | 711 } |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 return Api::CastIsolate(isolate); | 981 return Api::CastIsolate(isolate); |
| 981 } | 982 } |
| 982 | 983 |
| 983 | 984 |
| 984 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { | 985 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { |
| 985 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); | 986 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); |
| 986 return isolate->debugger()->GetIsolateId(); | 987 return isolate->debugger()->GetIsolateId(); |
| 987 } | 988 } |
| 988 | 989 |
| 989 } // namespace dart | 990 } // namespace dart |
| OLD | NEW |