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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 script_index_ = script_index; | 69 script_index_ = script_index; |
70 argv_ = argv; | 70 argv_ = argv; |
71 } | 71 } |
72 static int GetScriptIndex() { | 72 static int GetScriptIndex() { |
73 return script_index_; | 73 return script_index_; |
74 } | 74 } |
75 static char** GetArgv() { | 75 static char** GetArgv() { |
76 return argv_; | 76 return argv_; |
77 } | 77 } |
78 | 78 |
| 79 static DART_NORETURN void Exit(int exit_code); |
| 80 |
79 private: | 81 private: |
80 // The path to the executable. | 82 // The path to the executable. |
81 static const char* executable_name_; | 83 static const char* executable_name_; |
82 // The path to the resolved executable. | 84 // The path to the resolved executable. |
83 static const char* resolved_executable_name_; | 85 static const char* resolved_executable_name_; |
84 | 86 |
85 static const char* package_root_; | 87 static const char* package_root_; |
86 static int script_index_; | 88 static int script_index_; |
87 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] | 89 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] |
88 | 90 |
89 DISALLOW_ALLOCATION(); | 91 DISALLOW_ALLOCATION(); |
90 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); | 92 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); |
91 }; | 93 }; |
92 | 94 |
93 } // namespace bin | 95 } // namespace bin |
94 } // namespace dart | 96 } // namespace dart |
95 | 97 |
96 #endif // BIN_PLATFORM_H_ | 98 #endif // BIN_PLATFORM_H_ |
OLD | NEW |