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 RUNTIME_BIN_PLATFORM_H_ | 5 #ifndef RUNTIME_BIN_PLATFORM_H_ |
6 #define RUNTIME_BIN_PLATFORM_H_ | 6 #define RUNTIME_BIN_PLATFORM_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 // Stores and gets the flags passed to the executable. | 78 // Stores and gets the flags passed to the executable. |
79 static void SetExecutableArguments(int script_index, char** argv) { | 79 static void SetExecutableArguments(int script_index, char** argv) { |
80 script_index_ = script_index; | 80 script_index_ = script_index; |
81 argv_ = argv; | 81 argv_ = argv; |
82 } | 82 } |
83 static int GetScriptIndex() { return script_index_; } | 83 static int GetScriptIndex() { return script_index_; } |
84 static char** GetArgv() { return argv_; } | 84 static char** GetArgv() { return argv_; } |
85 | 85 |
86 static bool AnsiSupported(); | |
87 | |
88 static DART_NORETURN void Exit(int exit_code); | 86 static DART_NORETURN void Exit(int exit_code); |
89 | 87 |
90 private: | 88 private: |
91 // The path to the executable. | 89 // The path to the executable. |
92 static const char* executable_name_; | 90 static const char* executable_name_; |
93 // The path to the resolved executable. | 91 // The path to the resolved executable. |
94 static char* resolved_executable_name_; | 92 static char* resolved_executable_name_; |
95 | 93 |
96 static int script_index_; | 94 static int script_index_; |
97 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] | 95 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] |
98 | 96 |
99 DISALLOW_ALLOCATION(); | 97 DISALLOW_ALLOCATION(); |
100 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); | 98 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); |
101 }; | 99 }; |
102 | 100 |
103 } // namespace bin | 101 } // namespace bin |
104 } // namespace dart | 102 } // namespace dart |
105 | 103 |
106 #endif // RUNTIME_BIN_PLATFORM_H_ | 104 #endif // RUNTIME_BIN_PLATFORM_H_ |
OLD | NEW |