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