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

Side by Side Diff: src/mark-compact.cc

Issue 9159009: Robustify the clearing of the cache of map-related ICs on the map. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.h ('k') | src/mark-compact-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 } 1616 }
1617 } 1617 }
1618 }; 1618 };
1619 1619
1620 1620
1621 void MarkCompactCollector::ProcessNewlyMarkedObject(HeapObject* object) { 1621 void MarkCompactCollector::ProcessNewlyMarkedObject(HeapObject* object) {
1622 ASSERT(IsMarked(object)); 1622 ASSERT(IsMarked(object));
1623 ASSERT(HEAP->Contains(object)); 1623 ASSERT(HEAP->Contains(object));
1624 if (object->IsMap()) { 1624 if (object->IsMap()) {
1625 Map* map = Map::cast(object); 1625 Map* map = Map::cast(object);
1626 if (FLAG_cleanup_code_caches_at_gc) { 1626 ClearCacheOnMap(map);
1627 map->ClearCodeCache(heap());
1628 }
1629 1627
1630 // When map collection is enabled we have to mark through map's transitions 1628 // When map collection is enabled we have to mark through map's transitions
1631 // in a special way to make transition links weak. 1629 // in a special way to make transition links weak.
1632 // Only maps for subclasses of JSReceiver can have transitions. 1630 // Only maps for subclasses of JSReceiver can have transitions.
1633 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); 1631 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
1634 if (collect_maps_ && map->instance_type() >= FIRST_JS_RECEIVER_TYPE) { 1632 if (collect_maps_ && map->instance_type() >= FIRST_JS_RECEIVER_TYPE) {
1635 MarkMapContents(map); 1633 MarkMapContents(map);
1636 } else { 1634 } else {
1637 marking_deque_.PushBlack(map); 1635 marking_deque_.PushBlack(map);
1638 } 1636 }
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
3916 while (buffer != NULL) { 3914 while (buffer != NULL) {
3917 SlotsBuffer* next_buffer = buffer->next(); 3915 SlotsBuffer* next_buffer = buffer->next();
3918 DeallocateBuffer(buffer); 3916 DeallocateBuffer(buffer);
3919 buffer = next_buffer; 3917 buffer = next_buffer;
3920 } 3918 }
3921 *buffer_address = NULL; 3919 *buffer_address = NULL;
3922 } 3920 }
3923 3921
3924 3922
3925 } } // namespace v8::internal 3923 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698