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 5390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5401 // NOTE: Now the VM owns the [kernel_program] memory! Currently we do not | 5401 // NOTE: Now the VM owns the [kernel_program] memory! Currently we do not |
5402 // free it because (similar to the token stream) it will be used to repeatedly | 5402 // free it because (similar to the token stream) it will be used to repeatedly |
5403 // run the `kernel::FlowGraphBuilder()`. | 5403 // run the `kernel::FlowGraphBuilder()`. |
5404 kernel::KernelReader reader( | 5404 kernel::KernelReader reader( |
5405 reinterpret_cast<kernel::Program*>(kernel_program)); | 5405 reinterpret_cast<kernel::Program*>(kernel_program)); |
5406 const Object& tmp = reader.ReadProgram(); | 5406 const Object& tmp = reader.ReadProgram(); |
5407 if (tmp.IsError()) { | 5407 if (tmp.IsError()) { |
5408 return Api::NewHandle(T, tmp.raw()); | 5408 return Api::NewHandle(T, tmp.raw()); |
5409 } | 5409 } |
5410 library ^= tmp.raw(); | 5410 library ^= tmp.raw(); |
5411 library.set_debuggable(false); | |
5412 I->object_store()->set_root_library(library); | 5411 I->object_store()->set_root_library(library); |
5413 return Api::NewHandle(T, library.raw()); | 5412 return Api::NewHandle(T, library.raw()); |
5414 #endif | 5413 #endif |
5415 } | 5414 } |
5416 | 5415 |
5417 | 5416 |
5418 DART_EXPORT Dart_Handle Dart_RootLibrary() { | 5417 DART_EXPORT Dart_Handle Dart_RootLibrary() { |
5419 Thread* thread = Thread::Current(); | 5418 Thread* thread = Thread::Current(); |
5420 Isolate* isolate = thread->isolate(); | 5419 Isolate* isolate = thread->isolate(); |
5421 CHECK_ISOLATE(isolate); | 5420 CHECK_ISOLATE(isolate); |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6820 } | 6819 } |
6821 | 6820 |
6822 | 6821 |
6823 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6822 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
6824 #ifndef PRODUCT | 6823 #ifndef PRODUCT |
6825 Profiler::DumpStackTrace(context); | 6824 Profiler::DumpStackTrace(context); |
6826 #endif | 6825 #endif |
6827 } | 6826 } |
6828 | 6827 |
6829 } // namespace dart | 6828 } // namespace dart |
OLD | NEW |