Improved code generation infrastructure by doing simple register allocation and constant folding and propagation.
Optimized regular expression matching by avoiding to create intermediate string arrays and by flattening nested array representations of RegExp data.
Traverse a few stack frames when recording profiler samples to include partial call graphs in the profiling output.
Added support for using OProfile to profile generated code.
Added remote debugging support to the D8 developer shell.
Optimized creation of nested literals like JSON objects.
Fixed a bug in garbage collecting unused maps and turned it on by default (--collect-maps).
Added support for running tests under Valgrind.
git-svn-id: http://v8.googlecode.com/svn/trunk@1495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 3c9733d..6090dd4 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -211,6 +211,11 @@
}
+void Heap::SetLastScriptId(Object* last_script_id) {
+ last_script_id_ = last_script_id;
+}
+
+
#define GC_GREEDY_CHECK() \
ASSERT(!FLAG_gc_greedy || v8::internal::Heap::GarbageCollectionGreedyCheck())
@@ -226,43 +231,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