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

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

Issue 2651633002: VM: [Kernel] Fix bootstraping when Kernel isolate is used. (Closed)
Patch Set: Landing issue Created 3 years, 10 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 | « runtime/tools/kernel-service.dart ('k') | runtime/vm/dart_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) 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 5995 matching lines...) Expand 10 before | Expand all | Expand 10 after
6006 6006
6007 DART_EXPORT bool Dart_KernelIsolateIsRunning() { 6007 DART_EXPORT bool Dart_KernelIsolateIsRunning() {
6008 #ifdef DART_PRECOMPILED_RUNTIME 6008 #ifdef DART_PRECOMPILED_RUNTIME
6009 return false; 6009 return false;
6010 #else 6010 #else
6011 return KernelIsolate::IsRunning(); 6011 return KernelIsolate::IsRunning();
6012 #endif 6012 #endif
6013 } 6013 }
6014 6014
6015 6015
6016 DART_EXPORT Dart_Port Dart_ServiceWaitForKernelPort() {
6017 #ifdef DART_PRECOMPILED_RUNTIME
6018 return ILLEGAL_PORT;
6019 #else
6020 return KernelIsolate::WaitForKernelPort();
6021 #endif
6022 }
6023
6024 DART_EXPORT Dart_Port Dart_KernelPort() { 6016 DART_EXPORT Dart_Port Dart_KernelPort() {
6025 #ifdef DART_PRECOMPILED_RUNTIME 6017 #ifdef DART_PRECOMPILED_RUNTIME
6026 return false; 6018 return false;
6027 #else 6019 #else
6028 return KernelIsolate::KernelPort(); 6020 return KernelIsolate::KernelPort();
6029 #endif 6021 #endif
6030 } 6022 }
6031 6023
6032 6024
6025 DART_EXPORT Dart_KernelCompilationResult
6026 Dart_CompileToKernel(const char* script_uri) {
6027 #ifdef DART_PRECOMPILED_RUNTIME
6028 Dart_KernelCompilationResult result;
6029 result.status = Dart_KernelCompilationStatus_Unknown;
6030 result.error = strdup("Dart_CompileToKernel is unsupported.");
6031 return result;
6032 #else
6033 return KernelIsolate::CompileToKernel(script_uri);
6034 #endif
6035 }
6036
6033 // --- Service support --- 6037 // --- Service support ---
6034 6038
6035 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) { 6039 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) {
6036 Isolate* iso = reinterpret_cast<Isolate*>(isolate); 6040 Isolate* iso = reinterpret_cast<Isolate*>(isolate);
6037 return ServiceIsolate::IsServiceIsolate(iso); 6041 return ServiceIsolate::IsServiceIsolate(iso);
6038 } 6042 }
6039 6043
6040 6044
6041 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() { 6045 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort() {
6042 return ServiceIsolate::WaitForLoadPort(); 6046 return ServiceIsolate::WaitForLoadPort();
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
6816 } 6820 }
6817 6821
6818 6822
6819 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6823 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6820 #ifndef PRODUCT 6824 #ifndef PRODUCT
6821 Profiler::DumpStackTrace(context); 6825 Profiler::DumpStackTrace(context);
6822 #endif 6826 #endif
6823 } 6827 }
6824 6828
6825 } // namespace dart 6829 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tools/kernel-service.dart ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698