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 #ifndef BIN_PLATFORM_H_ | 5 #ifndef BIN_PLATFORM_H_ |
6 #define BIN_PLATFORM_H_ | 6 #define BIN_PLATFORM_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 | 9 |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 script_index_ = script_index; | 55 script_index_ = script_index; |
56 argv_ = argv; | 56 argv_ = argv; |
57 } | 57 } |
58 static int GetScriptIndex() { | 58 static int GetScriptIndex() { |
59 return script_index_; | 59 return script_index_; |
60 } | 60 } |
61 static char** GetArgv() { | 61 static char** GetArgv() { |
62 return argv_; | 62 return argv_; |
63 } | 63 } |
64 | 64 |
65 static void PrintBlocking(FILE* file, const char* format, ...) | |
66 PRINTF_ATTRIBUTE(2, 3); | |
67 | |
68 // Perform platform-specific cleanups. | |
69 static void Cleanup(); | |
70 | |
71 private: | 65 private: |
72 static const char* executable_name_; | 66 static const char* executable_name_; |
73 static const char* package_root_; | 67 static const char* package_root_; |
74 static int script_index_; | 68 static int script_index_; |
75 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] | 69 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] |
76 | 70 |
77 DISALLOW_ALLOCATION(); | 71 DISALLOW_ALLOCATION(); |
78 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); | 72 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); |
79 }; | 73 }; |
80 | 74 |
81 } // namespace bin | 75 } // namespace bin |
82 } // namespace dart | 76 } // namespace dart |
83 | 77 |
84 #endif // BIN_PLATFORM_H_ | 78 #endif // BIN_PLATFORM_H_ |
OLD | NEW |