| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 | 111 |
| 112 // Static indirection table for handles to constants. If a frame | 112 // Static indirection table for handles to constants. If a frame |
| 113 // element represents a constant, the data contains an index into | 113 // element represents a constant, the data contains an index into |
| 114 // this table of handles to the actual constants. | 114 // this table of handles to the actual constants. |
| 115 // Static indirection table for handles to constants. If a Result | 115 // Static indirection table for handles to constants. If a Result |
| 116 // represents a constant, the data contains an index into this table | 116 // represents a constant, the data contains an index into this table |
| 117 // of handles to the actual constants. | 117 // of handles to the actual constants. |
| 118 typedef ZoneList<Handle<Object> > ZoneObjectList; | 118 typedef ZoneList<Handle<Object> > ZoneObjectList; |
| 119 | 119 |
| 120 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ | 120 #define RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate) \ |
| 121 do { \ | 121 do { \ |
| 122 Isolate* __isolate__ = (isolate); \ | 122 Isolate* __isolate__ = (isolate); \ |
| 123 if (__isolate__->has_scheduled_exception()) { \ | 123 if (__isolate__->has_scheduled_exception()) { \ |
| 124 return __isolate__->PromoteScheduledException(); \ | 124 return __isolate__->PromoteScheduledException(); \ |
| 125 } \ | 125 } \ |
| 126 } while (false) | 126 } while (false) |
| 127 | 127 |
| 128 #define RETURN_HANDLE_IF_SCHEDULED_EXCEPTION(isolate, T) \ | 128 // TODO(yangguo): Remove after we completely changed to MaybeHandles. |
| 129 do { \ | |
| 130 Isolate* __isolate__ = (isolate); \ | |
| 131 if (__isolate__->has_scheduled_exception()) { \ | |
| 132 __isolate__->PromoteScheduledException(); \ | |
| 133 return Handle<T>::null(); \ | |
| 134 } \ | |
| 135 } while (false) | |
| 136 | |
| 137 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ | 129 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ |
| 138 do { \ | 130 do { \ |
| 139 if ((call).is_null()) { \ | 131 if ((call).is_null()) { \ |
| 140 ASSERT((isolate)->has_pending_exception()); \ | 132 ASSERT((isolate)->has_pending_exception()); \ |
| 141 return (value); \ | 133 return (value); \ |
| 142 } \ | 134 } \ |
| 143 } while (false) | 135 } while (false) |
| 144 | 136 |
| 137 // TODO(yangguo): Remove after we completely changed to MaybeHandles. |
| 145 #define CHECK_NOT_EMPTY_HANDLE(isolate, call) \ | 138 #define CHECK_NOT_EMPTY_HANDLE(isolate, call) \ |
| 146 do { \ | 139 do { \ |
| 147 ASSERT(!(isolate)->has_pending_exception()); \ | 140 ASSERT(!(isolate)->has_pending_exception()); \ |
| 148 CHECK(!(call).is_null()); \ | 141 CHECK(!(call).is_null()); \ |
| 149 } while (false) | 142 } while (false) |
| 150 | 143 |
| 144 // TODO(yangguo): Remove after we completely changed to MaybeHandles. |
| 151 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ | 145 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ |
| 152 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) | 146 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) |
| 153 | 147 |
| 154 | 148 |
| 155 // Macros for MaybeHandle. | 149 // Macros for MaybeHandle. |
| 156 | 150 |
| 157 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ | 151 #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ |
| 158 do { \ | 152 do { \ |
| 159 Isolate* __isolate__ = (isolate); \ | 153 Isolate* __isolate__ = (isolate); \ |
| 160 if (__isolate__->has_scheduled_exception()) { \ | 154 if (__isolate__->has_scheduled_exception()) { \ |
| (...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 } | 1544 } |
| 1551 | 1545 |
| 1552 EmbeddedVector<char, 128> filename_; | 1546 EmbeddedVector<char, 128> filename_; |
| 1553 FILE* file_; | 1547 FILE* file_; |
| 1554 int scope_depth_; | 1548 int scope_depth_; |
| 1555 }; | 1549 }; |
| 1556 | 1550 |
| 1557 } } // namespace v8::internal | 1551 } } // namespace v8::internal |
| 1558 | 1552 |
| 1559 #endif // V8_ISOLATE_H_ | 1553 #endif // V8_ISOLATE_H_ |
| OLD | NEW |