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

Side by Side Diff: src/spaces.cc

Issue 6756021: Pass in isolate when reporting deletion of objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-2010 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 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after
3007 3007
3008 // Cut the chunk out from the chunk list. 3008 // Cut the chunk out from the chunk list.
3009 current = current->next(); 3009 current = current->next();
3010 if (previous == NULL) { 3010 if (previous == NULL) {
3011 first_chunk_ = current; 3011 first_chunk_ = current;
3012 } else { 3012 } else {
3013 previous->set_next(current); 3013 previous->set_next(current);
3014 } 3014 }
3015 3015
3016 // Free the chunk. 3016 // Free the chunk.
3017 heap()->mark_compact_collector()->ReportDeleteIfNeeded(object); 3017 heap()->mark_compact_collector()->ReportDeleteIfNeeded(
3018 object, heap()->isolate());
3018 LiveObjectList::ProcessNonLive(object); 3019 LiveObjectList::ProcessNonLive(object);
3019 3020
3020 size_ -= static_cast<int>(chunk_size); 3021 size_ -= static_cast<int>(chunk_size);
3021 objects_size_ -= object->Size(); 3022 objects_size_ -= object->Size();
3022 page_count_--; 3023 page_count_--;
3023 ObjectSpace space = kObjectSpaceLoSpace; 3024 ObjectSpace space = kObjectSpaceLoSpace;
3024 if (executable == EXECUTABLE) space = kObjectSpaceCodeSpace; 3025 if (executable == EXECUTABLE) space = kObjectSpaceCodeSpace;
3025 heap()->isolate()->memory_allocator()->FreeRawMemory(chunk_address, 3026 heap()->isolate()->memory_allocator()->FreeRawMemory(chunk_address,
3026 chunk_size, 3027 chunk_size,
3027 executable); 3028 executable);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
3137 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { 3138 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) {
3138 if (obj->IsCode()) { 3139 if (obj->IsCode()) {
3139 Code* code = Code::cast(obj); 3140 Code* code = Code::cast(obj);
3140 isolate->code_kind_statistics()[code->kind()] += code->Size(); 3141 isolate->code_kind_statistics()[code->kind()] += code->Size();
3141 } 3142 }
3142 } 3143 }
3143 } 3144 }
3144 #endif // DEBUG 3145 #endif // DEBUG
3145 3146
3146 } } // namespace v8::internal 3147 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698