OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 #include "platform-posix.h" | 57 #include "platform-posix.h" |
58 #include "platform.h" | 58 #include "platform.h" |
59 #include "vm-state-inl.h" | 59 #include "vm-state-inl.h" |
60 | 60 |
61 | 61 |
62 namespace v8 { | 62 namespace v8 { |
63 namespace internal { | 63 namespace internal { |
64 | 64 |
65 | 65 |
66 double ceiling(double x) { | |
67 // Correct as on OS X | |
68 if (-1.0 < x && x < 0.0) { | |
69 return -0.0; | |
70 } else { | |
71 return ceil(x); | |
72 } | |
73 } | |
74 | |
75 | |
76 static Mutex* limit_mutex = NULL; | 66 static Mutex* limit_mutex = NULL; |
77 | 67 |
78 | 68 |
79 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 69 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
80 return 0; // FreeBSD runs on anything. | 70 return 0; // FreeBSD runs on anything. |
81 } | 71 } |
82 | 72 |
83 | 73 |
84 int OS::ActivationFrameAlignment() { | 74 int OS::ActivationFrameAlignment() { |
85 // 16 byte alignment on FreeBSD | 75 // 16 byte alignment on FreeBSD |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 limit_mutex = CreateMutex(); | 450 limit_mutex = CreateMutex(); |
461 } | 451 } |
462 | 452 |
463 | 453 |
464 void OS::TearDown() { | 454 void OS::TearDown() { |
465 delete limit_mutex; | 455 delete limit_mutex; |
466 } | 456 } |
467 | 457 |
468 | 458 |
469 } } // namespace v8::internal | 459 } } // namespace v8::internal |
OLD | NEW |