OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 26 matching lines...) Expand all Loading... |
37 // the platform dependent classes could have been implemented using abstract | 37 // the platform dependent classes could have been implemented using abstract |
38 // superclasses with virtual methods and having specializations for each | 38 // superclasses with virtual methods and having specializations for each |
39 // platform. This design was rejected because it was more complicated and | 39 // platform. This design was rejected because it was more complicated and |
40 // slower. It would require factory methods for selecting the right | 40 // slower. It would require factory methods for selecting the right |
41 // implementation and the overhead of virtual methods for performance | 41 // implementation and the overhead of virtual methods for performance |
42 // sensitive like mutex locking/unlocking. | 42 // sensitive like mutex locking/unlocking. |
43 | 43 |
44 #ifndef V8_PLATFORM_H_ | 44 #ifndef V8_PLATFORM_H_ |
45 #define V8_PLATFORM_H_ | 45 #define V8_PLATFORM_H_ |
46 | 46 |
| 47 #include "utils.h" |
| 48 #include "v8globals.h" |
| 49 |
47 #define V8_INFINITY INFINITY | 50 #define V8_INFINITY INFINITY |
48 | 51 |
49 // Windows specific stuff. | 52 // Windows specific stuff. |
50 #ifdef WIN32 | 53 #ifdef WIN32 |
51 | 54 |
52 // Microsoft Visual C++ specific stuff. | 55 // Microsoft Visual C++ specific stuff. |
53 #ifdef _MSC_VER | 56 #ifdef _MSC_VER |
54 | 57 |
55 enum { | 58 enum { |
56 FP_NAN, | 59 FP_NAN, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 #include "atomicops.h" | 119 #include "atomicops.h" |
117 | 120 |
118 namespace v8 { | 121 namespace v8 { |
119 namespace internal { | 122 namespace internal { |
120 | 123 |
121 // Use AtomicWord for a machine-sized pointer. It is assumed that | 124 // Use AtomicWord for a machine-sized pointer. It is assumed that |
122 // reads and writes of naturally aligned values of this type are atomic. | 125 // reads and writes of naturally aligned values of this type are atomic. |
123 typedef intptr_t AtomicWord; | 126 typedef intptr_t AtomicWord; |
124 | 127 |
125 class Semaphore; | 128 class Semaphore; |
| 129 class Mutex; |
126 | 130 |
127 double ceiling(double x); | 131 double ceiling(double x); |
128 double modulo(double x, double y); | 132 double modulo(double x, double y); |
129 | 133 |
130 // Forward declarations. | 134 // Forward declarations. |
131 class Socket; | 135 class Socket; |
132 | 136 |
133 // ---------------------------------------------------------------------------- | 137 // ---------------------------------------------------------------------------- |
134 // OS | 138 // OS |
135 // | 139 // |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 PlatformData* data_; // Platform specific data. | 608 PlatformData* data_; // Platform specific data. |
605 int samples_taken_; // Counts stack samples taken. | 609 int samples_taken_; // Counts stack samples taken. |
606 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); | 610 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); |
607 }; | 611 }; |
608 | 612 |
609 #endif // ENABLE_LOGGING_AND_PROFILING | 613 #endif // ENABLE_LOGGING_AND_PROFILING |
610 | 614 |
611 } } // namespace v8::internal | 615 } } // namespace v8::internal |
612 | 616 |
613 #endif // V8_PLATFORM_H_ | 617 #endif // V8_PLATFORM_H_ |
OLD | NEW |