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 23 matching lines...) Expand all Loading... |
34 #include "runtime-profiler.h" | 34 #include "runtime-profiler.h" |
35 | 35 |
36 namespace v8 { | 36 namespace v8 { |
37 namespace internal { | 37 namespace internal { |
38 | 38 |
39 class Simulator; | 39 class Simulator; |
40 | 40 |
41 #define RETURN_IF_SCHEDULED_EXCEPTION() \ | 41 #define RETURN_IF_SCHEDULED_EXCEPTION() \ |
42 if (Top::has_scheduled_exception()) return Top::PromoteScheduledException() | 42 if (Top::has_scheduled_exception()) return Top::PromoteScheduledException() |
43 | 43 |
| 44 #define RETURN_IF_EMPTY_HANDLE_VALUE(call, value) \ |
| 45 if (call.is_null()) { \ |
| 46 ASSERT(Top::has_pending_exception()); \ |
| 47 return value; \ |
| 48 } |
| 49 |
| 50 #define RETURN_IF_EMPTY_HANDLE(call) \ |
| 51 RETURN_IF_EMPTY_HANDLE_VALUE(call, Failure::Exception()) |
| 52 |
44 // Top has static variables used for JavaScript execution. | 53 // Top has static variables used for JavaScript execution. |
45 | 54 |
46 class SaveContext; // Forward declaration. | 55 class SaveContext; // Forward declaration. |
47 class ThreadVisitor; // Defined in v8threads.h | 56 class ThreadVisitor; // Defined in v8threads.h |
48 class VMState; // Defined in vm-state.h | 57 class VMState; // Defined in vm-state.h |
49 | 58 |
50 class ThreadLocalTop BASE_EMBEDDED { | 59 class ThreadLocalTop BASE_EMBEDDED { |
51 public: | 60 public: |
52 // Initialize the thread data. | 61 // Initialize the thread data. |
53 void Initialize(); | 62 void Initialize(); |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 static void Unlock() { Top::break_access_->Unlock(); } | 599 static void Unlock() { Top::break_access_->Unlock(); } |
591 | 600 |
592 static bool TryLock() { | 601 static bool TryLock() { |
593 return Top::break_access_->TryLock(); | 602 return Top::break_access_->TryLock(); |
594 } | 603 } |
595 }; | 604 }; |
596 | 605 |
597 } } // namespace v8::internal | 606 } } // namespace v8::internal |
598 | 607 |
599 #endif // V8_TOP_H_ | 608 #endif // V8_TOP_H_ |
OLD | NEW |