Go ahead. :-) On Mon, Mar 9, 2009 at 10:02 AM, Kevin Millikin <[email protected]> wrote: > This change (and the previous one) seem a bit wrong. I know the macro > expander doesn't really care, but it bothers my sensibilities to pass a pair > of expressions in one use of CALL_HEAP_FUNCTION and a pair of semicolons > statements in the other. Why not: > Index: src/heap-inl.h > =================================================================== > --- src/heap-inl.h (revision 1443) > +++ src/heap-inl.h (working copy) > @@ -226,43 +226,43 @@ > do { \ > GC_GREEDY_CHECK(); \ > Object* __object__ = FUNCTION_CALL; \ > - if (!__object__->IsFailure()) return RETURN_VALUE; \ > + if (!__object__->IsFailure()) RETURN_VALUE; \ > if (__object__->IsOutOfMemoryFailure()) { \ > v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_0"); \ > } \ > - if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \ > + if (!__object__->IsRetryAfterGC()) RETURN_EMPTY; \ > Heap::CollectGarbage(Failure::cast(__object__)->requested(), \ > Failure::cast(__object__)->allocation_space()); \ > __object__ = FUNCTION_CALL; \ > - if (!__object__->IsFailure()) return RETURN_VALUE; \ > + if (!__object__->IsFailure()) RETURN_VALUE; \ > if (__object__->IsOutOfMemoryFailure()) { \ > v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_1"); \ > } \ > - if (!__object__->IsRetryAfterGC()) return RETURN_EMPTY; \ > + if (!__object__->IsRetryAfterGC()) RETURN_EMPTY; \ > Counters::gc_last_resort_from_handles.Increment(); \ > Heap::CollectAllGarbage(); \ > { \ > AlwaysAllocateScope __scope__; \ > __object__ = FUNCTION_CALL; \ > } \ > - if (!__object__->IsFailure()) return RETURN_VALUE; \ > + if (!__object__->IsFailure()) RETURN_VALUE; \ > if (__object__->IsOutOfMemoryFailure()) { \ > /* TODO(1181417): Fix this. */ \ > v8::internal::V8::FatalProcessOutOfMemory("CALL_AND_RETRY_2"); \ > } \ > ASSERT(!__object__->IsRetryAfterGC()); \ > - return RETURN_EMPTY; \ > + RETURN_EMPTY; \ > } while (false) > > > -#define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE) \ > - CALL_AND_RETRY(FUNCTION_CALL, \ > - Handle<TYPE>(TYPE::cast(__object__)), \ > - Handle<TYPE>()) > +#define CALL_HEAP_FUNCTION(FUNCTION_CALL, TYPE) \ > + CALL_AND_RETRY(FUNCTION_CALL, \ > + return Handle<TYPE>(TYPE::cast(__object__)), \ > + return Handle<TYPE>()) > > > #define CALL_HEAP_FUNCTION_VOID(FUNCTION_CALL) \ > - CALL_AND_RETRY(FUNCTION_CALL, ;, ;) > + CALL_AND_RETRY(FUNCTION_CALL, return, return) > > > #ifdef DEBUG > > On Mon, Mar 9, 2009 at 1:53 AM, <[email protected]> wrote: >> >> Reviewers: Søren Gjesse, >> >> Description: >> cpplint does not like multiple semicolons on the same line. Do not >> lint that line. >> >> [email protected] >> >> Please review this at http://codereview.chromium.org/39330 >> >> SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ >> >> Affected files: >> M src/heap-inl.h >> >> >> Index: src/heap-inl.h >> =================================================================== >> --- src/heap-inl.h (revision 1442) >> +++ src/heap-inl.h (working copy) >> @@ -262,7 +262,7 @@ >> >> >> #define CALL_HEAP_FUNCTION_VOID(FUNCTION_CALL) \ >> - CALL_AND_RETRY(FUNCTION_CALL, ;, ;) >> + CALL_AND_RETRY(FUNCTION_CALL, ;, ;) // NOLINT >> >> >> #ifdef DEBUG >> >> >> >> > > > > >
--~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
