| 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 "bin/vmservice_impl.h" | 5 #include "bin/vmservice_impl.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
| 10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Set requested port. | 155 // Set requested port. |
| 156 DartUtils::SetIntegerField(library, "_port", server_port); | 156 DartUtils::SetIntegerField(library, "_port", server_port); |
| 157 // Install native resolver. | 157 // Install native resolver. |
| 158 result = Dart_SetNativeResolver(library, VmServiceNativeResolver); | 158 result = Dart_SetNativeResolver(library, VmServiceNativeResolver); |
| 159 SHUTDOWN_ON_ERROR(result); | 159 SHUTDOWN_ON_ERROR(result); |
| 160 result = Dart_Invoke(library, DartUtils::NewString("main"), 0, NULL); | 160 result = Dart_Invoke(library, DartUtils::NewString("main"), 0, NULL); |
| 161 SHUTDOWN_ON_ERROR(result); | 161 SHUTDOWN_ON_ERROR(result); |
| 162 | 162 |
| 163 result = LoadResources(library); | 163 result = LoadResources(library); |
| 164 SHUTDOWN_ON_ERROR(result); | 164 SHUTDOWN_ON_ERROR(result); |
| 165 result = Dart_CompileAll(); |
| 166 SHUTDOWN_ON_ERROR(result); |
| 165 | 167 |
| 166 port_ = Dart_GetMainPortId(); | 168 port_ = Dart_GetMainPortId(); |
| 167 | 169 |
| 168 Dart_ExitScope(); | 170 Dart_ExitScope(); |
| 169 Dart_ExitIsolate(); | 171 Dart_ExitIsolate(); |
| 170 | 172 |
| 171 return true; | 173 return true; |
| 172 } | 174 } |
| 173 | 175 |
| 174 | 176 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 if (!strcmp(function_name, entry.name) && | 444 if (!strcmp(function_name, entry.name) && |
| 443 (num_arguments == entry.num_arguments)) { | 445 (num_arguments == entry.num_arguments)) { |
| 444 return entry.function; | 446 return entry.function; |
| 445 } | 447 } |
| 446 } | 448 } |
| 447 return NULL; | 449 return NULL; |
| 448 } | 450 } |
| 449 | 451 |
| 450 } // namespace bin | 452 } // namespace bin |
| 451 } // namespace dart | 453 } // namespace dart |
| OLD | NEW |