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

Side by Side Diff: src/layout-descriptor.cc

Issue 934533002: ifdefs around LayoutDescriptor::IsConsistenWithMap() removed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/layout-descriptor.h ('k') | test/cctest/test-unboxed-doubles.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/layout-descriptor.h" 10 #include "src/layout-descriptor.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 DCHECK(offset_in_bytes < *out_end_of_contiguous_region_offset); 251 DCHECK(offset_in_bytes < *out_end_of_contiguous_region_offset);
252 return true; 252 return true;
253 } 253 }
254 *out_end_of_contiguous_region_offset = 254 *out_end_of_contiguous_region_offset =
255 offset_in_bytes + sequence_length * kPointerSize; 255 offset_in_bytes + sequence_length * kPointerSize;
256 DCHECK(offset_in_bytes < *out_end_of_contiguous_region_offset); 256 DCHECK(offset_in_bytes < *out_end_of_contiguous_region_offset);
257 return tagged; 257 return tagged;
258 } 258 }
259 259
260 260
261 #ifdef VERIFY_HEAP
262 bool LayoutDescriptor::IsConsistentWithMap(Map* map) { 261 bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
263 if (FLAG_unbox_double_fields) { 262 if (FLAG_unbox_double_fields) {
264 DescriptorArray* descriptors = map->instance_descriptors(); 263 DescriptorArray* descriptors = map->instance_descriptors();
265 int nof_descriptors = map->NumberOfOwnDescriptors(); 264 int nof_descriptors = map->NumberOfOwnDescriptors();
266 for (int i = 0; i < nof_descriptors; i++) { 265 for (int i = 0; i < nof_descriptors; i++) {
267 PropertyDetails details = descriptors->GetDetails(i); 266 PropertyDetails details = descriptors->GetDetails(i);
268 if (details.type() != DATA) continue; 267 if (details.type() != DATA) continue;
269 FieldIndex field_index = FieldIndex::ForDescriptor(map, i); 268 FieldIndex field_index = FieldIndex::ForDescriptor(map, i);
270 bool tagged_expected = 269 bool tagged_expected =
271 !field_index.is_inobject() || !details.representation().IsDouble(); 270 !field_index.is_inobject() || !details.representation().IsDouble();
272 for (int bit = 0; bit < details.field_width_in_words(); bit++) { 271 for (int bit = 0; bit < details.field_width_in_words(); bit++) {
273 bool tagged_actual = IsTagged(details.field_index() + bit); 272 bool tagged_actual = IsTagged(details.field_index() + bit);
274 DCHECK_EQ(tagged_expected, tagged_actual); 273 DCHECK_EQ(tagged_expected, tagged_actual);
275 if (tagged_actual != tagged_expected) return false; 274 if (tagged_actual != tagged_expected) return false;
276 } 275 }
277 } 276 }
278 } 277 }
279 return true; 278 return true;
280 } 279 }
281 #endif
282 } 280 }
283 } // namespace v8::internal 281 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/layout-descriptor.h ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698