Revision: 24497
Author: [email protected]
Date: Thu Oct 9 14:01:59 2014 UTC
Log: Remove deprecated verification for context separation.
[email protected]
Review URL: https://codereview.chromium.org/636173002
https://code.google.com/p/v8/source/detail?r=24497
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/heap/mark-compact.cc
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Tue Oct 7 07:29:24 2014
UTC
+++ /branches/bleeding_edge/src/flag-definitions.h Thu Oct 9 14:01:59 2014
UTC
@@ -731,8 +731,6 @@
DEFINE_BOOL(gc_verbose, false, "print stuff during garbage collection")
DEFINE_BOOL(heap_stats, false, "report heap statistics before and after
GC")
DEFINE_BOOL(code_stats, false, "report code statistics after GC")
-DEFINE_BOOL(verify_native_context_separation, false,
- "verify that code holds on to at most one native context after
GC")
DEFINE_BOOL(print_handles, false, "report handles after GC")
DEFINE_BOOL(print_global_handles, false, "report global handles after GC")
=======================================
--- /branches/bleeding_edge/src/heap/mark-compact.cc Thu Oct 2 08:24:48
2014 UTC
+++ /branches/bleeding_edge/src/heap/mark-compact.cc Thu Oct 9 14:01:59
2014 UTC
@@ -227,103 +227,6 @@
#endif // VERIFY_HEAP
-#ifdef DEBUG
-class VerifyNativeContextSeparationVisitor : public ObjectVisitor {
- public:
- VerifyNativeContextSeparationVisitor() : current_native_context_(NULL) {}
-
- void VisitPointers(Object** start, Object** end) {
- for (Object** current = start; current < end; current++) {
- if ((*current)->IsHeapObject()) {
- HeapObject* object = HeapObject::cast(*current);
- if (object->IsString()) continue;
- switch (object->map()->instance_type()) {
- case JS_FUNCTION_TYPE:
- CheckContext(JSFunction::cast(object)->context());
- break;
- case JS_GLOBAL_PROXY_TYPE:
- CheckContext(JSGlobalProxy::cast(object)->native_context());
- break;
- case JS_GLOBAL_OBJECT_TYPE:
- case JS_BUILTINS_OBJECT_TYPE:
- CheckContext(GlobalObject::cast(object)->native_context());
- break;
- case JS_ARRAY_TYPE:
- case JS_DATE_TYPE:
- case JS_OBJECT_TYPE:
- case JS_REGEXP_TYPE:
- VisitPointer(HeapObject::RawField(object,
JSObject::kMapOffset));
- break;
- case MAP_TYPE:
- VisitPointer(HeapObject::RawField(object,
Map::kPrototypeOffset));
- VisitPointer(HeapObject::RawField(object,
Map::kConstructorOffset));
- break;
- case FIXED_ARRAY_TYPE:
- if (object->IsContext()) {
- CheckContext(object);
- } else {
- FixedArray* array = FixedArray::cast(object);
- int length = array->length();
- // Set array length to zero to prevent cycles while iterating
- // over array bodies, this is easier than intrusive marking.
- array->set_length(0);
- array->IterateBody(FIXED_ARRAY_TYPE,
FixedArray::SizeFor(length),
- this);
- array->set_length(length);
- }
- break;
- case CELL_TYPE:
- case JS_PROXY_TYPE:
- case JS_VALUE_TYPE:
- case TYPE_FEEDBACK_INFO_TYPE:
- object->Iterate(this);
- break;
- case DECLARED_ACCESSOR_INFO_TYPE:
- case EXECUTABLE_ACCESSOR_INFO_TYPE:
- case BYTE_ARRAY_TYPE:
- case CALL_HANDLER_INFO_TYPE:
- case CODE_TYPE:
- case FIXED_DOUBLE_ARRAY_TYPE:
- case HEAP_NUMBER_TYPE:
- case MUTABLE_HEAP_NUMBER_TYPE:
- case INTERCEPTOR_INFO_TYPE:
- case ODDBALL_TYPE:
- case SCRIPT_TYPE:
- case SHARED_FUNCTION_INFO_TYPE:
- break;
- default:
- UNREACHABLE();
- }
- }
- }
- }
-
- private:
- void CheckContext(Object* context) {
- if (!context->IsContext()) return;
- Context* native_context = Context::cast(context)->native_context();
- if (current_native_context_ == NULL) {
- current_native_context_ = native_context;
- } else {
- CHECK_EQ(current_native_context_, native_context);
- }
- }
-
- Context* current_native_context_;
-};
-
-
-static void VerifyNativeContextSeparation(Heap* heap) {
- HeapObjectIterator it(heap->code_space());
-
- for (Object* object = it.Next(); object != NULL; object = it.Next()) {
- VerifyNativeContextSeparationVisitor visitor;
- Code::cast(object)->CodeIterateBody(&visitor);
- }
-}
-#endif
-
-
void MarkCompactCollector::SetUp() {
free_list_old_data_space_.Reset(new FreeList(heap_->old_data_space()));
free_list_old_pointer_space_.Reset(new
FreeList(heap_->old_pointer_space()));
@@ -405,12 +308,6 @@
SweepSpaces();
-#ifdef DEBUG
- if (FLAG_verify_native_context_separation) {
- VerifyNativeContextSeparation(heap_);
- }
-#endif
-
#ifdef VERIFY_HEAP
if (heap()->weak_embedded_objects_verification_enabled()) {
VerifyWeakEmbeddedObjectsInCode();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.