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

Side by Side Diff: src/heap/spaces.cc

Issue 1214673007: Verify that double unboxing is never performed on large objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | 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 // 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/full-codegen.h" 9 #include "src/full-codegen.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 HeapObject* object = chunk->GetObject(); 3039 HeapObject* object = chunk->GetObject();
3040 Page* page = Page::FromAddress(object->address()); 3040 Page* page = Page::FromAddress(object->address());
3041 CHECK(object->address() == page->area_start()); 3041 CHECK(object->address() == page->area_start());
3042 3042
3043 // The first word should be a map, and we expect all map pointers to be 3043 // The first word should be a map, and we expect all map pointers to be
3044 // in map space. 3044 // in map space.
3045 Map* map = object->map(); 3045 Map* map = object->map();
3046 CHECK(map->IsMap()); 3046 CHECK(map->IsMap());
3047 CHECK(heap()->map_space()->Contains(map)); 3047 CHECK(heap()->map_space()->Contains(map));
3048 3048
3049 // Double unboxing in LO space is not allowed. This would break the
3050 // lookup mechanism for store and slot buffer entries which use the
3051 // page header tag.
3052 CHECK(object->ContentType() != HeapObjectContents::kMixedValues);
3053
3049 // We have only code, sequential strings, external strings 3054 // We have only code, sequential strings, external strings
3050 // (sequential strings that have been morphed into external 3055 // (sequential strings that have been morphed into external
3051 // strings), fixed arrays, byte arrays, and constant pool arrays in the 3056 // strings), fixed arrays, byte arrays, and constant pool arrays in the
3052 // large object space. 3057 // large object space.
3053 CHECK(object->IsCode() || object->IsSeqString() || 3058 CHECK(object->IsCode() || object->IsSeqString() ||
3054 object->IsExternalString() || object->IsFixedArray() || 3059 object->IsExternalString() || object->IsFixedArray() ||
3055 object->IsFixedDoubleArray() || object->IsByteArray()); 3060 object->IsFixedDoubleArray() || object->IsByteArray());
3056 3061
3057 // The object itself should look OK. 3062 // The object itself should look OK.
3058 object->ObjectVerify(); 3063 object->ObjectVerify();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 object->ShortPrint(); 3139 object->ShortPrint();
3135 PrintF("\n"); 3140 PrintF("\n");
3136 } 3141 }
3137 printf(" --------------------------------------\n"); 3142 printf(" --------------------------------------\n");
3138 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3143 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3139 } 3144 }
3140 3145
3141 #endif // DEBUG 3146 #endif // DEBUG
3142 } // namespace internal 3147 } // namespace internal
3143 } // namespace v8 3148 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698