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

Side by Side Diff: src/spaces.cc

Issue 12090072: Work around a bug in Clang that optimizes away a NULL check (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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/spaces.h ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 object_size, 704 object_size,
705 executable, 705 executable,
706 owner); 706 owner);
707 if (chunk == NULL) return NULL; 707 if (chunk == NULL) return NULL;
708 return LargePage::Initialize(isolate_->heap(), chunk); 708 return LargePage::Initialize(isolate_->heap(), chunk);
709 } 709 }
710 710
711 711
712 void MemoryAllocator::Free(MemoryChunk* chunk) { 712 void MemoryAllocator::Free(MemoryChunk* chunk) {
713 LOG(isolate_, DeleteEvent("MemoryChunk", chunk)); 713 LOG(isolate_, DeleteEvent("MemoryChunk", chunk));
714 if (chunk->owner() != NULL) { 714 if (chunk->has_owner()) {
715 ObjectSpace space = 715 ObjectSpace space =
716 static_cast<ObjectSpace>(1 << chunk->owner()->identity()); 716 static_cast<ObjectSpace>(1 << chunk->owner()->identity());
717 PerformAllocationCallback(space, kAllocationActionFree, chunk->size()); 717 PerformAllocationCallback(space, kAllocationActionFree, chunk->size());
718 } 718 }
719 719
720 isolate_->heap()->RememberUnmappedPage( 720 isolate_->heap()->RememberUnmappedPage(
721 reinterpret_cast<Address>(chunk), chunk->IsEvacuationCandidate()); 721 reinterpret_cast<Address>(chunk), chunk->IsEvacuationCandidate());
722 722
723 delete chunk->slots_buffer(); 723 delete chunk->slots_buffer();
724 delete chunk->skip_list(); 724 delete chunk->skip_list();
(...skipping 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 object->ShortPrint(); 3149 object->ShortPrint();
3150 PrintF("\n"); 3150 PrintF("\n");
3151 } 3151 }
3152 printf(" --------------------------------------\n"); 3152 printf(" --------------------------------------\n");
3153 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3153 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3154 } 3154 }
3155 3155
3156 #endif // DEBUG 3156 #endif // DEBUG
3157 3157
3158 } } // namespace v8::internal 3158 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698