Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 11812) |
+++ src/objects-inl.h (working copy) |
@@ -3663,6 +3663,8 @@ |
#endif |
ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
+ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
+ kOptimizedCodeMapOffset) |
ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) |
ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
@@ -3874,6 +3876,17 @@ |
kDontOptimize) |
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline) |
+void SharedFunctionInfo::BeforeVisitingPointers() { |
+ if (IsInobjectSlackTrackingInProgress()) DetachInitialMap(); |
+ |
+ // Flush optimized code map on major GC. |
+ // Note: we may experiment with rebuilding it or retaining entries |
+ // which should survive as we iterate through optimized functions |
+ // anyway. |
+ set_optimized_code_map(Smi::FromInt(0)); |
+} |
+ |
+ |
ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |