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

Unified Diff: src/heap-inl.h

Issue 1933: Generalized the EvalCache into a CompilationCache and enabled... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« src/compilation-cache.h ('K') | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
===================================================================
--- src/heap-inl.h (revision 268)
+++ src/heap-inl.h (working copy)
@@ -196,6 +196,32 @@
} while (false)
+// Don't use the following names: __object__, __failure__.
+#define CALL_HEAP_FUNCTION_VOID(FUNCTION_CALL) \
+ GC_GREEDY_CHECK(); \
+ Object* __object__ = FUNCTION_CALL; \
+ if (__object__->IsFailure()) { \
+ if (__object__->IsRetryAfterGC()) { \
+ Failure* __failure__ = Failure::cast(__object__); \
+ if (!Heap::CollectGarbage(__failure__->requested(), \
+ __failure__->allocation_space())) { \
+ /* TODO(1181417): Fix this. */ \
+ V8::FatalProcessOutOfMemory("Handles"); \
+ } \
+ __object__ = FUNCTION_CALL; \
+ if (__object__->IsFailure()) { \
+ if (__object__->IsRetryAfterGC()) { \
+ /* TODO(1181417): Fix this. */ \
+ V8::FatalProcessOutOfMemory("Handles"); \
+ } \
+ return; \
+ } \
+ } else { \
+ return; \
+ } \
+ }
+
+
#ifdef DEBUG
inline bool Heap::allow_allocation(bool new_state) {
« src/compilation-cache.h ('K') | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698