OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 | 499 |
500 | 500 |
501 #ifdef DEBUG | 501 #ifdef DEBUG |
502 #define GC_GREEDY_CHECK() \ | 502 #define GC_GREEDY_CHECK() \ |
503 if (FLAG_gc_greedy) HEAP->GarbageCollectionGreedyCheck() | 503 if (FLAG_gc_greedy) HEAP->GarbageCollectionGreedyCheck() |
504 #else | 504 #else |
505 #define GC_GREEDY_CHECK() { } | 505 #define GC_GREEDY_CHECK() { } |
506 #endif | 506 #endif |
507 | 507 |
| 508 |
508 // Calls the FUNCTION_CALL function and retries it up to three times | 509 // Calls the FUNCTION_CALL function and retries it up to three times |
509 // to guarantee that any allocations performed during the call will | 510 // to guarantee that any allocations performed during the call will |
510 // succeed if there's enough memory. | 511 // succeed if there's enough memory. |
511 | 512 |
512 // Warning: Do not use the identifiers __object__, __maybe_object__ or | 513 // Warning: Do not use the identifiers __object__, __maybe_object__ or |
513 // __scope__ in a call to this macro. | 514 // __scope__ in a call to this macro. |
514 | 515 |
515 #define CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)\ | 516 #define CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, RETURN_VALUE, RETURN_EMPTY)\ |
516 do { \ | 517 do { \ |
517 GC_GREEDY_CHECK(); \ | 518 GC_GREEDY_CHECK(); \ |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 702 |
702 | 703 |
703 Heap* _inline_get_heap_() { | 704 Heap* _inline_get_heap_() { |
704 return HEAP; | 705 return HEAP; |
705 } | 706 } |
706 | 707 |
707 | 708 |
708 } } // namespace v8::internal | 709 } } // namespace v8::internal |
709 | 710 |
710 #endif // V8_HEAP_INL_H_ | 711 #endif // V8_HEAP_INL_H_ |
OLD | NEW |