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

Unified Diff: src/objects-inl.h

Issue 1562083003: [compiler] Treat all embedded context references weakly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 4c98296d8a151c3b30092665364cb71bd67dd9a9..3d4a3d4b0522d3eca4022b5c4539825ec50a90f7 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5260,12 +5260,9 @@ bool Code::IsWeakObjectInOptimizedCode(Object* object) {
if (object->IsJSReceiver()) {
return FLAG_weak_embedded_objects_in_optimized_code;
}
- if (object->IsFixedArray()) {
+ if (object->IsContext()) {
// Contexts of inlined functions are embedded in optimized code.
- Map* map = HeapObject::cast(object)->map();
- Heap* heap = map->GetHeap();
- return FLAG_weak_embedded_objects_in_optimized_code &&
- map == heap->function_context_map();
+ return FLAG_weak_embedded_objects_in_optimized_code;
}
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698