| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 "vm/kernel_isolate.h" | 5 #include "vm/kernel_isolate.h" |
| 6 | 6 |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 const Library& root_library = | 147 const Library& root_library = |
| 148 Library::Handle(Z, I->object_store()->root_library()); | 148 Library::Handle(Z, I->object_store()->root_library()); |
| 149 if (root_library.IsNull()) { | 149 if (root_library.IsNull()) { |
| 150 if (FLAG_trace_kernel) { | 150 if (FLAG_trace_kernel) { |
| 151 OS::Print("kernel-service: Embedder did not install a script."); | 151 OS::Print("kernel-service: Embedder did not install a script."); |
| 152 } | 152 } |
| 153 // Kernel isolate is not supported by embedder. | 153 // Kernel isolate is not supported by embedder. |
| 154 return false; | 154 return false; |
| 155 } | 155 } |
| 156 ASSERT(!root_library.IsNull()); | 156 ASSERT(!root_library.IsNull()); |
| 157 const String& entry_name = String::Handle(Z, String::New("start")); | 157 const String& entry_name = String::Handle(Z, String::New("main")); |
| 158 ASSERT(!entry_name.IsNull()); | 158 ASSERT(!entry_name.IsNull()); |
| 159 const Function& entry = Function::Handle( | 159 const Function& entry = Function::Handle( |
| 160 Z, root_library.LookupFunctionAllowPrivate(entry_name)); | 160 Z, root_library.LookupFunctionAllowPrivate(entry_name)); |
| 161 if (entry.IsNull()) { | 161 if (entry.IsNull()) { |
| 162 // Kernel isolate is not supported by embedder. | 162 // Kernel isolate is not supported by embedder. |
| 163 if (FLAG_trace_kernel) { | 163 if (FLAG_trace_kernel) { |
| 164 OS::Print("kernel-service: Embedder did not provide a main function."); | 164 OS::Print("kernel-service: Embedder did not provide a main function."); |
| 165 } | 165 } |
| 166 return false; | 166 return false; |
| 167 } | 167 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 MonitorLocker ml(monitor_); | 257 MonitorLocker ml(monitor_); |
| 258 while (initializing_ && (kernel_port_ == ILLEGAL_PORT)) { | 258 while (initializing_ && (kernel_port_ == ILLEGAL_PORT)) { |
| 259 ml.Wait(); | 259 ml.Wait(); |
| 260 } | 260 } |
| 261 return kernel_port_; | 261 return kernel_port_; |
| 262 } | 262 } |
| 263 | 263 |
| 264 #endif // DART_PRECOMPILED_RUNTIME | 264 #endif // DART_PRECOMPILED_RUNTIME |
| 265 | 265 |
| 266 } // namespace dart | 266 } // namespace dart |
| OLD | NEW |