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/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_OS_WINDOWS) | 6 #if defined(TARGET_OS_WINDOWS) |
7 | 7 |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 #include "vm/vtune.h" |
9 | 10 |
10 #include <malloc.h> // NOLINT | 11 #include <malloc.h> // NOLINT |
11 #include <time.h> // NOLINT | 12 #include <time.h> // NOLINT |
12 | 13 |
13 #include "platform/utils.h" | 14 #include "platform/utils.h" |
14 #include "platform/assert.h" | 15 #include "platform/assert.h" |
15 | 16 |
16 namespace dart { | 17 namespace dart { |
17 | 18 |
18 // As a side-effect sets the globals _timezone, _daylight and _tzname. | 19 // As a side-effect sets the globals _timezone, _daylight and _tzname. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 base = 16; | 248 base = 16; |
248 } | 249 } |
249 errno = 0; | 250 errno = 0; |
250 *value = _strtoi64(str, &endptr, base); | 251 *value = _strtoi64(str, &endptr, base); |
251 return ((errno == 0) && (endptr != str) && (*endptr == 0)); | 252 return ((errno == 0) && (endptr != str) && (*endptr == 0)); |
252 } | 253 } |
253 | 254 |
254 | 255 |
255 void OS::RegisterCodeObservers() { | 256 void OS::RegisterCodeObservers() { |
256 #if defined(DART_VTUNE_SUPPORT) | 257 #if defined(DART_VTUNE_SUPPORT) |
257 Register(new VTuneCodeObserver); | 258 CodeObservers::Register(new VTuneCodeObserver); |
258 #endif | 259 #endif |
259 } | 260 } |
260 | 261 |
261 | 262 |
262 void OS::PrintErr(const char* format, ...) { | 263 void OS::PrintErr(const char* format, ...) { |
263 va_list args; | 264 va_list args; |
264 va_start(args, format); | 265 va_start(args, format); |
265 VFPrint(stderr, format, args); | 266 VFPrint(stderr, format, args); |
266 va_end(args); | 267 va_end(args); |
267 } | 268 } |
(...skipping 20 matching lines...) Expand all Loading... |
288 } | 289 } |
289 | 290 |
290 | 291 |
291 void OS::Exit(int code) { | 292 void OS::Exit(int code) { |
292 exit(code); | 293 exit(code); |
293 } | 294 } |
294 | 295 |
295 } // namespace dart | 296 } // namespace dart |
296 | 297 |
297 #endif // defined(TARGET_OS_WINDOWS) | 298 #endif // defined(TARGET_OS_WINDOWS) |
OLD | NEW |