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

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

Issue 2632183002: Debugging in kernel shaping up. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | runtime/vm/kernel.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 5364 matching lines...) Expand 10 before | Expand all | Expand 10 after
5375 // NOTE: Now the VM owns the [kernel_program] memory! Currently we do not 5375 // NOTE: Now the VM owns the [kernel_program] memory! Currently we do not
5376 // free it because (similar to the token stream) it will be used to repeatedly 5376 // free it because (similar to the token stream) it will be used to repeatedly
5377 // run the `kernel::FlowGraphBuilder()`. 5377 // run the `kernel::FlowGraphBuilder()`.
5378 kernel::KernelReader reader( 5378 kernel::KernelReader reader(
5379 reinterpret_cast<kernel::Program*>(kernel_program)); 5379 reinterpret_cast<kernel::Program*>(kernel_program));
5380 const Object& tmp = reader.ReadProgram(); 5380 const Object& tmp = reader.ReadProgram();
5381 if (tmp.IsError()) { 5381 if (tmp.IsError()) {
5382 return Api::NewHandle(T, tmp.raw()); 5382 return Api::NewHandle(T, tmp.raw());
5383 } 5383 }
5384 library ^= tmp.raw(); 5384 library ^= tmp.raw();
5385 library.set_debuggable(false);
5386 I->object_store()->set_root_library(library); 5385 I->object_store()->set_root_library(library);
5387 return Api::NewHandle(T, library.raw()); 5386 return Api::NewHandle(T, library.raw());
5388 #endif 5387 #endif
5389 } 5388 }
5390 5389
5391 5390
5392 DART_EXPORT Dart_Handle Dart_RootLibrary() { 5391 DART_EXPORT Dart_Handle Dart_RootLibrary() {
5393 Thread* thread = Thread::Current(); 5392 Thread* thread = Thread::Current();
5394 Isolate* isolate = thread->isolate(); 5393 Isolate* isolate = thread->isolate();
5395 CHECK_ISOLATE(isolate); 5394 CHECK_ISOLATE(isolate);
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
6791 } 6790 }
6792 6791
6793 6792
6794 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6793 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6795 #ifndef PRODUCT 6794 #ifndef PRODUCT
6796 Profiler::DumpStackTrace(context); 6795 Profiler::DumpStackTrace(context);
6797 #endif 6796 #endif
6798 } 6797 }
6799 6798
6800 } // namespace dart 6799 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | runtime/vm/kernel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698