| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/platform.h" | 5 #include "bin/platform.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "bin/file.h" | 9 #include "bin/file.h" |
| 10 #include "bin/utils.h" | 10 #include "bin/utils.h" |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 namespace bin { | 13 namespace bin { |
| 14 | 14 |
| 15 const char* Platform::executable_name_ = NULL; | 15 const char* Platform::executable_name_ = NULL; |
| 16 const char* Platform::resolved_executable_name_ = NULL; | 16 char* Platform::resolved_executable_name_ = NULL; |
| 17 int Platform::script_index_ = 1; | 17 int Platform::script_index_ = 1; |
| 18 char** Platform::argv_ = NULL; | 18 char** Platform::argv_ = NULL; |
| 19 | 19 |
| 20 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) { | 20 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) { |
| 21 Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors())); | 21 Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors())); |
| 22 } | 22 } |
| 23 | 23 |
| 24 | 24 |
| 25 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) { | 25 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) { |
| 26 Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem())); | 26 Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem())); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) { | 122 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) { |
| 123 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString())); | 123 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString())); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace bin | 126 } // namespace bin |
| 127 } // namespace dart | 127 } // namespace dart |
| OLD | NEW |