| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |