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

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

Issue 9836091: Reset function info counters after context disposal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comment Created 8 years, 9 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/heap.cc ('k') | src/objects.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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 } 1399 }
1400 1400
1401 1401
1402 static void VisitSharedFunctionInfoAndFlushCodeGeneric( 1402 static void VisitSharedFunctionInfoAndFlushCodeGeneric(
1403 Map* map, HeapObject* object, bool known_flush_code_candidate) { 1403 Map* map, HeapObject* object, bool known_flush_code_candidate) {
1404 Heap* heap = map->GetHeap(); 1404 Heap* heap = map->GetHeap();
1405 SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(object); 1405 SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(object);
1406 1406
1407 if (shared->IsInobjectSlackTrackingInProgress()) shared->DetachInitialMap(); 1407 if (shared->IsInobjectSlackTrackingInProgress()) shared->DetachInitialMap();
1408 1408
1409 if (shared->ic_age() != heap->global_ic_age()) {
1410 shared->ResetForNewContext(heap->global_ic_age());
1411 }
1412
1409 if (!known_flush_code_candidate) { 1413 if (!known_flush_code_candidate) {
1410 known_flush_code_candidate = IsFlushable(heap, shared); 1414 known_flush_code_candidate = IsFlushable(heap, shared);
1411 if (known_flush_code_candidate) { 1415 if (known_flush_code_candidate) {
1412 heap->mark_compact_collector()->code_flusher()->AddCandidate(shared); 1416 heap->mark_compact_collector()->code_flusher()->AddCandidate(shared);
1413 } 1417 }
1414 } 1418 }
1415 1419
1416 VisitSharedFunctionInfoFields(heap, object, known_flush_code_candidate); 1420 VisitSharedFunctionInfoFields(heap, object, known_flush_code_candidate);
1417 } 1421 }
1418 1422
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after
4131 while (buffer != NULL) { 4135 while (buffer != NULL) {
4132 SlotsBuffer* next_buffer = buffer->next(); 4136 SlotsBuffer* next_buffer = buffer->next();
4133 DeallocateBuffer(buffer); 4137 DeallocateBuffer(buffer);
4134 buffer = next_buffer; 4138 buffer = next_buffer;
4135 } 4139 }
4136 *buffer_address = NULL; 4140 *buffer_address = NULL;
4137 } 4141 }
4138 4142
4139 4143
4140 } } // namespace v8::internal 4144 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698