OLD | NEW |
1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 | 100 |
101 // Static indirection table for handles to constants. If a frame | 101 // Static indirection table for handles to constants. If a frame |
102 // element represents a constant, the data contains an index into | 102 // element represents a constant, the data contains an index into |
103 // this table of handles to the actual constants. | 103 // this table of handles to the actual constants. |
104 // Static indirection table for handles to constants. If a Result | 104 // Static indirection table for handles to constants. If a Result |
105 // represents a constant, the data contains an index into this table | 105 // represents a constant, the data contains an index into this table |
106 // of handles to the actual constants. | 106 // of handles to the actual constants. |
107 typedef ZoneList<Handle<Object> > ZoneObjectList; | 107 typedef ZoneList<Handle<Object> > ZoneObjectList; |
108 | 108 |
109 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ | 109 #define RETURN_IF_SCHEDULED_EXCEPTION(isolate) \ |
110 if (isolate->has_scheduled_exception()) \ | 110 do { \ |
111 return isolate->PromoteScheduledException() | 111 Isolate* __isolate__ = (isolate); \ |
| 112 if (__isolate__->has_scheduled_exception()) { \ |
| 113 return __isolate__->PromoteScheduledException(); \ |
| 114 } \ |
| 115 } while (false) |
112 | 116 |
113 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ | 117 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ |
114 if (call.is_null()) { \ | 118 do { \ |
115 ASSERT(isolate->has_pending_exception()); \ | 119 if ((call).is_null()) { \ |
116 return value; \ | 120 ASSERT((isolate)->has_pending_exception()); \ |
117 } | 121 return (value); \ |
| 122 } \ |
| 123 } while (false) |
118 | 124 |
119 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ | 125 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ |
120 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) | 126 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) |
121 | 127 |
122 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ | 128 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ |
123 C(Handler, handler) \ | 129 C(Handler, handler) \ |
124 C(CEntryFP, c_entry_fp) \ | 130 C(CEntryFP, c_entry_fp) \ |
125 C(Context, context) \ | 131 C(Context, context) \ |
126 C(PendingException, pending_exception) \ | 132 C(PendingException, pending_exception) \ |
127 C(ExternalCaughtException, external_caught_exception) \ | 133 C(ExternalCaughtException, external_caught_exception) \ |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 | 1372 |
1367 // Mark the global context with out of memory. | 1373 // Mark the global context with out of memory. |
1368 inline void Context::mark_out_of_memory() { | 1374 inline void Context::mark_out_of_memory() { |
1369 global_context()->set_out_of_memory(HEAP->true_value()); | 1375 global_context()->set_out_of_memory(HEAP->true_value()); |
1370 } | 1376 } |
1371 | 1377 |
1372 | 1378 |
1373 } } // namespace v8::internal | 1379 } } // namespace v8::internal |
1374 | 1380 |
1375 #endif // V8_ISOLATE_H_ | 1381 #endif // V8_ISOLATE_H_ |
OLD | NEW |