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

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

Issue 919043002: Fix for the compilation issue in shared mode introduced by r26624 (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') | src/objects-debug.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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 *out_end_of_contiguous_region_offset = header_size_; 249 *out_end_of_contiguous_region_offset = header_size_;
250 } 250 }
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
260
261 #ifdef VERIFY_HEAP
262 bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
263 if (FLAG_unbox_double_fields) {
264 DescriptorArray* descriptors = map->instance_descriptors();
265 int nof_descriptors = map->NumberOfOwnDescriptors();
266 for (int i = 0; i < nof_descriptors; i++) {
267 PropertyDetails details = descriptors->GetDetails(i);
268 if (details.type() != DATA) continue;
269 FieldIndex field_index = FieldIndex::ForDescriptor(map, i);
270 bool tagged_expected =
271 !field_index.is_inobject() || !details.representation().IsDouble();
272 for (int bit = 0; bit < details.field_width_in_words(); bit++) {
273 bool tagged_actual = IsTagged(details.field_index() + bit);
274 DCHECK_EQ(tagged_expected, tagged_actual);
275 if (tagged_actual != tagged_expected) return false;
276 }
277 }
278 }
279 return true;
280 }
281 #endif
259 } 282 }
260 } // namespace v8::internal 283 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/layout-descriptor.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698