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

Side by Side Diff: src/heap.cc

Issue 9428026: Cleaned up setting of accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')
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 5063 matching lines...) Expand 10 before | Expand all | Expand 10 after
5074 old_pointer_space_->Verify(&visitor); 5074 old_pointer_space_->Verify(&visitor);
5075 map_space_->Verify(&visitor); 5075 map_space_->Verify(&visitor);
5076 5076
5077 VerifyPointersVisitor no_dirty_regions_visitor; 5077 VerifyPointersVisitor no_dirty_regions_visitor;
5078 old_data_space_->Verify(&no_dirty_regions_visitor); 5078 old_data_space_->Verify(&no_dirty_regions_visitor);
5079 code_space_->Verify(&no_dirty_regions_visitor); 5079 code_space_->Verify(&no_dirty_regions_visitor);
5080 cell_space_->Verify(&no_dirty_regions_visitor); 5080 cell_space_->Verify(&no_dirty_regions_visitor);
5081 5081
5082 lo_space_->Verify(); 5082 lo_space_->Verify();
5083 5083
5084 // TODO(svenpanne) We should enable this when our fast->slow->fast-mode dance 5084 VerifyNoAccessorPairSharing();
5085 // for setting accessor properties is fixed.
5086 // VerifyNoAccessorPairSharing();
5087 } 5085 }
5088 5086
5089 5087
5090 void Heap::VerifyNoAccessorPairSharing() { 5088 void Heap::VerifyNoAccessorPairSharing() {
5091 // Verification is done in 2 phases: First we mark all AccessorPairs, checking 5089 // Verification is done in 2 phases: First we mark all AccessorPairs, checking
5092 // that we mark only unmarked pairs, then we clear all marks, restoring the 5090 // that we mark only unmarked pairs, then we clear all marks, restoring the
5093 // initial state. We use the Smi tag of the AccessorPair's getter as the 5091 // initial state. We use the Smi tag of the AccessorPair's getter as the
5094 // marking bit, because we can never see a Smi as the getter. 5092 // marking bit, because we can never see a Smi as the getter.
5095 for (int phase = 0; phase < 2; phase++) { 5093 for (int phase = 0; phase < 2; phase++) {
5096 HeapObjectIterator iter(map_space()); 5094 HeapObjectIterator iter(map_space());
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
6930 isolate_->heap()->store_buffer()->Compact(); 6928 isolate_->heap()->store_buffer()->Compact();
6931 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6929 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6932 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6930 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6933 next = chunk->next_chunk(); 6931 next = chunk->next_chunk();
6934 isolate_->memory_allocator()->Free(chunk); 6932 isolate_->memory_allocator()->Free(chunk);
6935 } 6933 }
6936 chunks_queued_for_free_ = NULL; 6934 chunks_queued_for_free_ = NULL;
6937 } 6935 }
6938 6936
6939 } } // namespace v8::internal 6937 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698