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

Unified Diff: src/mark-compact.cc

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 4 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
« no previous file with comments | « src/liveobjectlist.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index df4739ea04d9b1b271705ae2922ac14ecc6388fb..b3a0bf7df1efc88a031db73a1c40fb7cfe830751 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -224,9 +224,9 @@ static void VerifyEvacuation(Heap* heap) {
}
-class VerifyNativeContextSeparationVisitor: public ObjectVisitor {
+class VerifyGlobalContextSeparationVisitor: public ObjectVisitor {
public:
- VerifyNativeContextSeparationVisitor() : current_native_context_(NULL) {}
+ VerifyGlobalContextSeparationVisitor() : current_global_context_(NULL) {}
void VisitPointers(Object** start, Object** end) {
for (Object** current = start; current < end; current++) {
@@ -238,11 +238,11 @@ class VerifyNativeContextSeparationVisitor: public ObjectVisitor {
CheckContext(JSFunction::cast(object)->context());
break;
case JS_GLOBAL_PROXY_TYPE:
- CheckContext(JSGlobalProxy::cast(object)->native_context());
+ CheckContext(JSGlobalProxy::cast(object)->context());
break;
case JS_GLOBAL_OBJECT_TYPE:
case JS_BUILTINS_OBJECT_TYPE:
- CheckContext(GlobalObject::cast(object)->native_context());
+ CheckContext(GlobalObject::cast(object)->global_context());
break;
case JS_ARRAY_TYPE:
case JS_DATE_TYPE:
@@ -295,23 +295,23 @@ class VerifyNativeContextSeparationVisitor: public ObjectVisitor {
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;
+ Context* global_context = Context::cast(context)->global_context();
+ if (current_global_context_ == NULL) {
+ current_global_context_ = global_context;
} else {
- CHECK_EQ(current_native_context_, native_context);
+ CHECK_EQ(current_global_context_, global_context);
}
}
- Context* current_native_context_;
+ Context* current_global_context_;
};
-static void VerifyNativeContextSeparation(Heap* heap) {
+static void VerifyGlobalContextSeparation(Heap* heap) {
HeapObjectIterator it(heap->code_space());
for (Object* object = it.Next(); object != NULL; object = it.Next()) {
- VerifyNativeContextSeparationVisitor visitor;
+ VerifyGlobalContextSeparationVisitor visitor;
Code::cast(object)->CodeIterateBody(&visitor);
}
}
@@ -389,8 +389,8 @@ void MarkCompactCollector::CollectGarbage() {
if (!FLAG_collect_maps) ReattachInitialMaps();
#ifdef DEBUG
- if (FLAG_verify_native_context_separation) {
- VerifyNativeContextSeparation(heap_);
+ if (FLAG_verify_global_context_separation) {
+ VerifyGlobalContextSeparation(heap_);
}
#endif
@@ -1269,7 +1269,7 @@ class MarkCompactMarkingVisitor
static inline bool IsValidNotBuiltinContext(Object* ctx) {
return ctx->IsContext() &&
- !Context::cast(ctx)->global_object()->IsJSBuiltinsObject();
+ !Context::cast(ctx)->global()->IsJSBuiltinsObject();
}
@@ -2423,7 +2423,7 @@ void MarkCompactCollector::AfterMarking() {
void MarkCompactCollector::ProcessMapCaches() {
- Object* raw_context = heap()->native_contexts_list_;
+ Object* raw_context = heap()->global_contexts_list_;
while (raw_context != heap()->undefined_value()) {
Context* context = reinterpret_cast<Context*>(raw_context);
if (IsMarked(context)) {
@@ -3404,8 +3404,8 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
}
}
- // Update pointer from the native contexts list.
- updating_visitor.VisitPointer(heap_->native_contexts_list_address());
+ // Update pointer from the global contexts list.
+ updating_visitor.VisitPointer(heap_->global_contexts_list_address());
heap_->symbol_table()->Iterate(&updating_visitor);
« no previous file with comments | « src/liveobjectlist.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698