 Chromium Code Reviews
 Chromium Code Reviews Issue 10103035:
  Share optimized code for closures.  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
    
  
    Issue 10103035:
  Share optimized code for closures.  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/| Index: src/mark-compact.cc | 
| =================================================================== | 
| --- src/mark-compact.cc (revision 11527) | 
| +++ src/mark-compact.cc (working copy) | 
| @@ -1302,10 +1302,8 @@ | 
| static void VisitSharedFunctionInfoGeneric(Map* map, HeapObject* object) { | 
| - SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(object); | 
| + reinterpret_cast<SharedFunctionInfo*>(object)->BeforeVisitingPointers(); | 
| 
Michael Starzinger
2012/05/23 11:16:29
We should be able to use SharedFunctionInfo::cast(
 
fschneider
2012/06/14 11:08:23
Done.
 | 
| - if (shared->IsInobjectSlackTrackingInProgress()) shared->DetachInitialMap(); | 
| - | 
| FixedBodyVisitor<StaticMarkingVisitor, | 
| SharedFunctionInfo::BodyDescriptor, | 
| void>::Visit(map, object); | 
| @@ -1408,7 +1406,7 @@ | 
| Heap* heap = map->GetHeap(); | 
| SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(object); | 
| - if (shared->IsInobjectSlackTrackingInProgress()) shared->DetachInitialMap(); | 
| + shared->BeforeVisitingPointers(); | 
| if (!known_flush_code_candidate) { | 
| known_flush_code_candidate = IsFlushable(heap, shared); | 
| @@ -1545,8 +1543,8 @@ | 
| } | 
| VisitPointers(heap, | 
| - SLOT_ADDR(object, SharedFunctionInfo::kScopeInfoOffset), | 
| - SLOT_ADDR(object, SharedFunctionInfo::kSize)); | 
| + SLOT_ADDR(object, SharedFunctionInfo::kOptimizedCodeMapOffset), | 
| + SLOT_ADDR(object, SharedFunctionInfo::kSize)); | 
| } | 
| #undef SLOT_ADDR |