| 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 #include "vm/os.h" | 5 #include "vm/os.h" |
| 6 | 6 |
| 7 #include <malloc.h> | 7 #include <malloc.h> |
| 8 #include <time.h> | 8 #include <time.h> |
| 9 | 9 |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 (str[i + 1] == 'x' || str[i + 1] == 'X') && | 226 (str[i + 1] == 'x' || str[i + 1] == 'X') && |
| 227 (str[i + 2] != '\0')) { | 227 (str[i + 2] != '\0')) { |
| 228 base = 16; | 228 base = 16; |
| 229 } | 229 } |
| 230 errno = 0; | 230 errno = 0; |
| 231 *value = _strtoi64(str, &endptr, base); | 231 *value = _strtoi64(str, &endptr, base); |
| 232 return ((errno == 0) && (endptr != str) && (*endptr == 0)); | 232 return ((errno == 0) && (endptr != str) && (*endptr == 0)); |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| 236 void OS::RegisterCodeObservers() { |
| 237 #if defined(DART_VTUNE_SUPPORT) |
| 238 Register(new VTuneCodeObserver); |
| 239 #endif |
| 240 } |
| 241 |
| 242 |
| 236 void OS::PrintErr(const char* format, ...) { | 243 void OS::PrintErr(const char* format, ...) { |
| 237 va_list args; | 244 va_list args; |
| 238 va_start(args, format); | 245 va_start(args, format); |
| 239 VFPrint(stderr, format, args); | 246 VFPrint(stderr, format, args); |
| 240 va_end(args); | 247 va_end(args); |
| 241 } | 248 } |
| 242 | 249 |
| 243 | 250 |
| 244 void OS::InitOnce() { | 251 void OS::InitOnce() { |
| 245 // TODO(5411554): For now we check that initonce is called only once, | 252 // TODO(5411554): For now we check that initonce is called only once, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 260 void OS::Abort() { | 267 void OS::Abort() { |
| 261 abort(); | 268 abort(); |
| 262 } | 269 } |
| 263 | 270 |
| 264 | 271 |
| 265 void OS::Exit(int code) { | 272 void OS::Exit(int code) { |
| 266 exit(code); | 273 exit(code); |
| 267 } | 274 } |
| 268 | 275 |
| 269 } // namespace dart | 276 } // namespace dart |
| OLD | NEW |