Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Side by Side Diff: src/isolate.h

Issue 8983016: Fix a few preprocessor macros that could capture an 'else'. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/checks.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 if (isolate->has_scheduled_exception()) { \
Sven Panne 2012/01/04 13:19:49 We should probably always use parentheses around a
112 return isolate->PromoteScheduledException(); \
113 } \
114 } while (false)
112 115
113 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \ 116 #define RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, value) \
114 if (call.is_null()) { \ 117 do { \
115 ASSERT(isolate->has_pending_exception()); \ 118 if (call.is_null()) { \
Sven Panne 2012/01/04 13:19:49 Parentheses again in this macro...
116 return value; \ 119 ASSERT(isolate->has_pending_exception()); \
117 } 120 return value; \
121 } \
122 } while (false)
118 123
119 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \ 124 #define RETURN_IF_EMPTY_HANDLE(isolate, call) \
120 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) 125 RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
121 126
122 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \ 127 #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
123 C(Handler, handler) \ 128 C(Handler, handler) \
124 C(CEntryFP, c_entry_fp) \ 129 C(CEntryFP, c_entry_fp) \
125 C(Context, context) \ 130 C(Context, context) \
126 C(PendingException, pending_exception) \ 131 C(PendingException, pending_exception) \
127 C(ExternalCaughtException, external_caught_exception) \ 132 C(ExternalCaughtException, external_caught_exception) \
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 1371
1367 // Mark the global context with out of memory. 1372 // Mark the global context with out of memory.
1368 inline void Context::mark_out_of_memory() { 1373 inline void Context::mark_out_of_memory() {
1369 global_context()->set_out_of_memory(HEAP->true_value()); 1374 global_context()->set_out_of_memory(HEAP->true_value());
1370 } 1375 }
1371 1376
1372 1377
1373 } } // namespace v8::internal 1378 } } // namespace v8::internal
1374 1379
1375 #endif // V8_ISOLATE_H_ 1380 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/checks.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698