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

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

Issue 545263002: Add ActivationFrame_GetFramePointer method and test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed comment that out parameter can be null Created 6 years, 3 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
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 if (location != NULL) { 302 if (location != NULL) {
303 location->script_url = Api::NewHandle(isolate, frame->SourceUrl()); 303 location->script_url = Api::NewHandle(isolate, frame->SourceUrl());
304 const Library& lib = Library::Handle(frame->Library()); 304 const Library& lib = Library::Handle(frame->Library());
305 location->library_id = lib.index(); 305 location->library_id = lib.index();
306 location->token_pos = frame->TokenPos(); 306 location->token_pos = frame->TokenPos();
307 } 307 }
308 return Api::Success(); 308 return Api::Success();
309 } 309 }
310 310
311 DART_EXPORT Dart_Handle Dart_ActivationFrameGetFramePointer(
312 Dart_ActivationFrame activation_frame,
313 uintptr_t* frame_pointer) {
314 Isolate* isolate = Isolate::Current();
315 DARTSCOPE(isolate);
316 CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
317
318 if (frame_pointer != NULL) {
319 *frame_pointer = static_cast<uintptr_t>(frame->fp());
320 }
321 return Api::Success();
322 }
323
311 324
312 DART_EXPORT Dart_Handle Dart_GetFunctionOrigin(Dart_Handle function_in) { 325 DART_EXPORT Dart_Handle Dart_GetFunctionOrigin(Dart_Handle function_in) {
313 Isolate* isolate = Isolate::Current(); 326 Isolate* isolate = Isolate::Current();
314 DARTSCOPE(isolate); 327 DARTSCOPE(isolate);
315 UNWRAP_AND_CHECK_PARAM(Function, function, function_in); 328 UNWRAP_AND_CHECK_PARAM(Function, function, function_in);
316 329
317 const Class& cls = Class::Handle(function.origin()); 330 const Class& cls = Class::Handle(function.origin());
318 if (!cls.IsTopLevel()) { 331 if (!cls.IsTopLevel()) {
319 return Dart_NewInteger(cls.id()); 332 return Dart_NewInteger(cls.id());
320 } 333 }
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 return Api::CastIsolate(isolate); 992 return Api::CastIsolate(isolate);
980 } 993 }
981 994
982 995
983 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { 996 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) {
984 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); 997 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
985 return isolate->debugger()->GetIsolateId(); 998 return isolate->debugger()->GetIsolateId();
986 } 999 }
987 1000
988 } // namespace dart 1001 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698