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

Side by Side Diff: src/objects-inl.h

Issue 10908237: Moving the WhitenessWitness back to DescriptorArray. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Another NoIncrementalWriteBarrierSet. Created 8 years, 3 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/objects.cc ('k') | src/transitions.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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 } 2160 }
2161 2161
2162 2162
2163 void DescriptorArray::SwapSortedKeys(int first, int second) { 2163 void DescriptorArray::SwapSortedKeys(int first, int second) {
2164 int first_key = GetSortedKeyIndex(first); 2164 int first_key = GetSortedKeyIndex(first);
2165 SetSortedKey(first, GetSortedKeyIndex(second)); 2165 SetSortedKey(first, GetSortedKeyIndex(second));
2166 SetSortedKey(second, first_key); 2166 SetSortedKey(second, first_key);
2167 } 2167 }
2168 2168
2169 2169
2170 FixedArray::WhitenessWitness::WhitenessWitness(FixedArray* array) 2170 DescriptorArray::WhitenessWitness::WhitenessWitness(FixedArray* array)
2171 : marking_(array->GetHeap()->incremental_marking()) { 2171 : marking_(array->GetHeap()->incremental_marking()) {
2172 marking_->EnterNoMarkingScope(); 2172 marking_->EnterNoMarkingScope();
2173 ASSERT(Marking::Color(array) == Marking::WHITE_OBJECT); 2173 ASSERT(Marking::Color(array) == Marking::WHITE_OBJECT);
2174 } 2174 }
2175 2175
2176 2176
2177 FixedArray::WhitenessWitness::~WhitenessWitness() { 2177 DescriptorArray::WhitenessWitness::~WhitenessWitness() {
2178 marking_->LeaveNoMarkingScope(); 2178 marking_->LeaveNoMarkingScope();
2179 } 2179 }
2180 2180
2181 2181
2182 template<typename Shape, typename Key> 2182 template<typename Shape, typename Key>
2183 int HashTable<Shape, Key>::ComputeCapacity(int at_least_space_for) { 2183 int HashTable<Shape, Key>::ComputeCapacity(int at_least_space_for) {
2184 const int kMinCapacity = 32; 2184 const int kMinCapacity = 32;
2185 int capacity = RoundUpToPowerOf2(at_least_space_for * 2); 2185 int capacity = RoundUpToPowerOf2(at_least_space_for * 2);
2186 if (capacity < kMinCapacity) { 2186 if (capacity < kMinCapacity) {
2187 capacity = kMinCapacity; // Guarantee min capacity. 2187 capacity = kMinCapacity; // Guarantee min capacity.
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after
5485 #undef WRITE_UINT32_FIELD 5485 #undef WRITE_UINT32_FIELD
5486 #undef READ_SHORT_FIELD 5486 #undef READ_SHORT_FIELD
5487 #undef WRITE_SHORT_FIELD 5487 #undef WRITE_SHORT_FIELD
5488 #undef READ_BYTE_FIELD 5488 #undef READ_BYTE_FIELD
5489 #undef WRITE_BYTE_FIELD 5489 #undef WRITE_BYTE_FIELD
5490 5490
5491 5491
5492 } } // namespace v8::internal 5492 } } // namespace v8::internal
5493 5493
5494 #endif // V8_OBJECTS_INL_H_ 5494 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698