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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #ifndef V8_PLATFORM_H_ | 44 #ifndef V8_PLATFORM_H_ |
45 #define V8_PLATFORM_H_ | 45 #define V8_PLATFORM_H_ |
46 | 46 |
47 #include <cstdarg> | 47 #include <cstdarg> |
48 | 48 |
49 #include "platform/mutex.h" | 49 #include "platform/mutex.h" |
50 #include "platform/semaphore.h" | 50 #include "platform/semaphore.h" |
51 #include "utils.h" | 51 #include "utils.h" |
52 #include "v8globals.h" | 52 #include "v8globals.h" |
53 | 53 |
| 54 // This is lined up with blink's method of crashing. |
| 55 #if defined(__GNUC__) |
| 56 #define V8_IMMEDIATE_CRASH() __builtin_trap() |
| 57 #else |
| 58 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() |
| 59 #endif |
| 60 |
54 #ifdef __sun | 61 #ifdef __sun |
55 # ifndef signbit | 62 # ifndef signbit |
56 namespace std { | 63 namespace std { |
57 int signbit(double x); | 64 int signbit(double x); |
58 } | 65 } |
59 # endif | 66 # endif |
60 #endif | 67 #endif |
61 | 68 |
62 // Microsoft Visual C++ specific stuff. | 69 // Microsoft Visual C++ specific stuff. |
63 #if V8_CC_MSVC | 70 #if V8_CC_MSVC |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 char name_[kMaxThreadNameLength]; | 595 char name_[kMaxThreadNameLength]; |
589 int stack_size_; | 596 int stack_size_; |
590 Semaphore* start_semaphore_; | 597 Semaphore* start_semaphore_; |
591 | 598 |
592 DISALLOW_COPY_AND_ASSIGN(Thread); | 599 DISALLOW_COPY_AND_ASSIGN(Thread); |
593 }; | 600 }; |
594 | 601 |
595 } } // namespace v8::internal | 602 } } // namespace v8::internal |
596 | 603 |
597 #endif // V8_PLATFORM_H_ | 604 #endif // V8_PLATFORM_H_ |
OLD | NEW |