| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_DARTUTILS_H_ | 5 #ifndef BIN_DARTUTILS_H_ |
| 6 #define BIN_DARTUTILS_H_ | 6 #define BIN_DARTUTILS_H_ |
| 7 | 7 |
| 8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
| 9 #include "bin/globals.h" | |
| 10 | 9 |
| 11 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
| 12 | 11 |
| 12 #include "platform/globals.h" |
| 13 |
| 13 class CommandLineOptions { | 14 class CommandLineOptions { |
| 14 public: | 15 public: |
| 15 explicit CommandLineOptions(int max_count) | 16 explicit CommandLineOptions(int max_count) |
| 16 : count_(0), max_count_(max_count), arguments_(NULL) { | 17 : count_(0), max_count_(max_count), arguments_(NULL) { |
| 17 static const int kWordSize = sizeof(intptr_t); | 18 static const int kWordSize = sizeof(intptr_t); |
| 18 arguments_ = reinterpret_cast<const char **>(malloc(max_count * kWordSize)); | 19 arguments_ = reinterpret_cast<const char **>(malloc(max_count * kWordSize)); |
| 19 if (arguments_ == NULL) { | 20 if (arguments_ == NULL) { |
| 20 max_count_ = 0; | 21 max_count_ = 0; |
| 21 } | 22 } |
| 22 } | 23 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 90 |
| 90 private: | 91 private: |
| 91 static const char* GetCanonicalPath(const char* reference_dir, | 92 static const char* GetCanonicalPath(const char* reference_dir, |
| 92 const char* filename); | 93 const char* filename); |
| 93 | 94 |
| 94 DISALLOW_ALLOCATION(); | 95 DISALLOW_ALLOCATION(); |
| 95 DISALLOW_IMPLICIT_CONSTRUCTORS(DartUtils); | 96 DISALLOW_IMPLICIT_CONSTRUCTORS(DartUtils); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 #endif // BIN_DARTUTILS_H_ | 99 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |