| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 | 147 |
| 148 | 148 |
| 149 // Generate a pseudo-random number in the range 0-2^31-1. Usually | 149 // Generate a pseudo-random number in the range 0-2^31-1. Usually |
| 150 // defined in stdlib.h | 150 // defined in stdlib.h |
| 151 int random() { | 151 int random() { |
| 152 return rand(); | 152 return rand(); |
| 153 } | 153 } |
| 154 | 154 |
| 155 | 155 |
| 156 // Case-insensitive string comparisons. Use stricmp() on Win32. Usually defined | |
| 157 // in strings.h. | |
| 158 int strcasecmp(const char* s1, const char* s2) { | |
| 159 return _stricmp(s1, s2); | |
| 160 } | |
| 161 | |
| 162 | |
| 163 // Case-insensitive bounded string comparisons. Use stricmp() on Win32. Usually | 156 // Case-insensitive bounded string comparisons. Use stricmp() on Win32. Usually |
| 164 // defined in strings.h. | 157 // defined in strings.h. |
| 165 int strncasecmp(const char* s1, const char* s2, int n) { | 158 int strncasecmp(const char* s1, const char* s2, int n) { |
| 166 return _strnicmp(s1, s2, n); | 159 return _strnicmp(s1, s2, n); |
| 167 } | 160 } |
| 168 | 161 |
| 169 namespace v8 { namespace internal { | 162 namespace v8 { namespace internal { |
| 170 | 163 |
| 171 double ceiling(double x) { | 164 double ceiling(double x) { |
| 172 return ceil(x); | 165 return ceil(x); |
| (...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 | 1565 |
| 1573 // Release the thread handles | 1566 // Release the thread handles |
| 1574 CloseHandle(data_->sampler_thread_); | 1567 CloseHandle(data_->sampler_thread_); |
| 1575 CloseHandle(data_->profiled_thread_); | 1568 CloseHandle(data_->profiled_thread_); |
| 1576 } | 1569 } |
| 1577 | 1570 |
| 1578 | 1571 |
| 1579 #endif // ENABLE_LOGGING_AND_PROFILING | 1572 #endif // ENABLE_LOGGING_AND_PROFILING |
| 1580 | 1573 |
| 1581 } } // namespace v8::internal | 1574 } } // namespace v8::internal |
| OLD | NEW |