説明を見る。00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <stdio.h>
00033 #include <stdlib.h>
00034
00035 #include "v8.h"
00036
00037 #include "platform.h"
00038
00039
00040 namespace v8 { namespace internal {
00041
00042
00043 double ceiling(double x) {
00044 UNIMPLEMENTED();
00045 return 0;
00046 }
00047
00048
00049
00050 void OS::Setup() {
00051
00052 UNIMPLEMENTED();
00053 }
00054
00055
00056
00057 int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) {
00058 UNIMPLEMENTED();
00059 *secs = 0;
00060 *usecs = 0;
00061 return 0;
00062 }
00063
00064
00065
00066
00067 double OS::TimeCurrentMillis() {
00068 UNIMPLEMENTED();
00069 return 0;
00070 }
00071
00072
00073
00074 int64_t OS::Ticks() {
00075 UNIMPLEMENTED();
00076 return 0;
00077 }
00078
00079
00080
00081
00082 char* OS::LocalTimezone(double time) {
00083 UNIMPLEMENTED();
00084 return "<none>";
00085 }
00086
00087
00088
00089 double OS::DaylightSavingsOffset(double time) {
00090 UNIMPLEMENTED();
00091 return 0;
00092 }
00093
00094
00095
00096
00097 double OS::LocalTimeOffset() {
00098 UNIMPLEMENTED();
00099 return 0;
00100 }
00101
00102
00103
00104 void OS::Print(const char* format, ...) {
00105 UNIMPLEMENTED();
00106 }
00107
00108
00109
00110 void OS::VPrint(const char* format, va_list args) {
00111
00112 vfprintf(stdout, format, args);
00113 }
00114
00115
00116
00117 void OS::PrintError(const char* format, ...) {
00118
00119 va_list args;
00120 va_start(args, format);
00121 VPrintError(format, args);
00122 va_end(args);
00123 }
00124
00125
00126
00127 void OS::VPrintError(const char* format, va_list args) {
00128
00129 vfprintf(stderr, format, args);
00130 }
00131
00132
00133 int OS::SNPrintF(char* str, size_t size, const char* format, ...) {
00134 UNIMPLEMENTED();
00135 return 0;
00136 }
00137
00138
00139 int OS::VSNPrintF(char* str, size_t size, const char* format, va_list args) {
00140 UNIMPLEMENTED();
00141 return 0;
00142 }
00143
00144
00145 double OS::nan_value() {
00146 UNIMPLEMENTED();
00147 return 0;
00148 }
00149
00150 bool OS::IsOutsideAllocatedSpace(void* address) {
00151 UNIMPLEMENTED();
00152 return false;
00153 }
00154
00155
00156 size_t OS::AllocateAlignment() {
00157 UNIMPLEMENTED();
00158 return 0;
00159 }
00160
00161
00162 void* OS::Allocate(const size_t requested,
00163 size_t* allocated,
00164 bool executable) {
00165 UNIMPLEMENTED();
00166 return NULL;
00167 }
00168
00169
00170 void OS::Free(void* buf, const size_t length) {
00171
00172 UNIMPLEMENTED();
00173 }
00174
00175
00176 void OS::Sleep(int milliseconds) {
00177 UNIMPLEMENTED();
00178 }
00179
00180
00181 void OS::Abort() {
00182
00183 abort();
00184 }
00185
00186
00187 void OS::DebugBreak() {
00188 UNIMPLEMENTED();
00189 }
00190
00191
00192 OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size,
00193 void* initial) {
00194 UNIMPLEMENTED();
00195 return NULL;
00196 }
00197
00198
00199 void OS::LogSharedLibraryAddresses() {
00200 UNIMPLEMENTED();
00201 }
00202
00203
00204 int OS::StackWalk(OS::StackFrame* frames, int frames_size) {
00205 UNIMPLEMENTED();
00206 return 0;
00207 }
00208
00209
00210 VirtualMemory::VirtualMemory(size_t size, void* address_hint) {
00211 UNIMPLEMENTED();
00212 }
00213
00214
00215 VirtualMemory::~VirtualMemory() {
00216 UNIMPLEMENTED();
00217 }
00218
00219
00220 bool VirtualMemory::IsReserved() {
00221 UNIMPLEMENTED();
00222 return false;
00223 }
00224
00225
00226 bool VirtualMemory::Commit(void* address, size_t size, bool executable) {
00227 UNIMPLEMENTED();
00228 return false;
00229 }
00230
00231
00232 bool VirtualMemory::Uncommit(void* address, size_t size) {
00233 UNIMPLEMENTED();
00234 return false;
00235 }
00236
00237
00238 class ThreadHandle::PlatformData : public Malloced {
00239 public:
00240 explicit PlatformData(ThreadHandle::Kind kind) {
00241 UNIMPLEMENTED();
00242 }
00243
00244 void* pd_data_;
00245 };
00246
00247
00248 ThreadHandle::ThreadHandle(Kind kind) {
00249 UNIMPLEMENTED();
00250
00251 data_ = new PlatformData(kind);
00252 }
00253
00254
00255 void ThreadHandle::Initialize(ThreadHandle::Kind kind) {
00256 UNIMPLEMENTED();
00257 }
00258
00259
00260 ThreadHandle::~ThreadHandle() {
00261 UNIMPLEMENTED();
00262
00263 delete data_;
00264 }
00265
00266
00267 bool ThreadHandle::IsSelf() const {
00268 UNIMPLEMENTED();
00269 return false;
00270 }
00271
00272
00273 bool ThreadHandle::IsValid() const {
00274 UNIMPLEMENTED();
00275 return false;
00276 }
00277
00278
00279 Thread::Thread() : ThreadHandle(ThreadHandle::INVALID) {
00280 UNIMPLEMENTED();
00281 }
00282
00283
00284 Thread::~Thread() {
00285 UNIMPLEMENTED();
00286 }
00287
00288
00289 void Thread::Start() {
00290 UNIMPLEMENTED();
00291 }
00292
00293
00294 void Thread::Join() {
00295 UNIMPLEMENTED();
00296 }
00297
00298
00299 Thread::LocalStorageKey Thread::CreateThreadLocalKey() {
00300 UNIMPLEMENTED();
00301 return static_cast<LocalStorageKey>(0);
00302 }
00303
00304
00305 void Thread::DeleteThreadLocalKey(LocalStorageKey key) {
00306 UNIMPLEMENTED();
00307 }
00308
00309
00310 void* Thread::GetThreadLocal(LocalStorageKey key) {
00311 UNIMPLEMENTED();
00312 return NULL;
00313 }
00314
00315
00316 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
00317 UNIMPLEMENTED();
00318 }
00319
00320
00321 void Thread::YieldCPU() {
00322 UNIMPLEMENTED();
00323 }
00324
00325
00326 class NullMutex : public Mutex {
00327 public:
00328 NullMutex() : data_(NULL) {
00329 UNIMPLEMENTED();
00330 }
00331
00332 virtual ~NullMutex() {
00333 UNIMPLEMENTED();
00334 }
00335
00336 virtual int Lock() {
00337 UNIMPLEMENTED();
00338 return 0;
00339 }
00340
00341 virtual int Unlock() {
00342 UNIMPLEMENTED();
00343 return 0;
00344 }
00345
00346 private:
00347 void* data_;
00348 };
00349
00350
00351 Mutex* OS::CreateMutex() {
00352 UNIMPLEMENTED();
00353 return new NullMutex();
00354 }
00355
00356
00357 class NullSemaphore : public Semaphore {
00358 public:
00359 explicit NullSemaphore(int count) : data_(NULL) {
00360 UNIMPLEMENTED();
00361 }
00362
00363 virtual ~NullSemaphore() {
00364 UNIMPLEMENTED();
00365 }
00366
00367 virtual void Wait() {
00368 UNIMPLEMENTED();
00369 }
00370
00371 virtual void Signal() {
00372 UNIMPLEMENTED();
00373 }
00374 private:
00375 void* data_;
00376 };
00377
00378
00379 Semaphore* OS::CreateSemaphore(int count) {
00380 UNIMPLEMENTED();
00381 return new NullSemaphore(count);
00382 }
00383
00384 #ifdef ENABLE_LOGGING_AND_PROFILING
00385
00386 class ProfileSampler::PlatformData : public Malloced {
00387 public:
00388 PlatformData() {
00389 UNIMPLEMENTED();
00390 }
00391 };
00392
00393
00394 ProfileSampler::ProfileSampler(int interval) {
00395 UNIMPLEMENTED();
00396
00397 data_ = new PlatformData();
00398 interval_ = interval;
00399 active_ = false;
00400 }
00401
00402
00403 ProfileSampler::~ProfileSampler() {
00404 UNIMPLEMENTED();
00405
00406 delete data_;
00407 }
00408
00409
00410 void ProfileSampler::Start() {
00411 UNIMPLEMENTED();
00412 }
00413
00414
00415 void ProfileSampler::Stop() {
00416 UNIMPLEMENTED();
00417 }
00418
00419 #endif // ENABLE_LOGGING_AND_PROFILING
00420
00421 } }