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

Side by Side Diff: src/objects-debug.cc

Issue 856503002: Massive renaming of PropertyType values and other implied stuff. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Spurious file addition fixed Created 5 years, 11 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/objects.cc ('k') | src/objects-inl.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 // 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/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (map()->unused_property_fields() != actual_unused_property_fields) { 269 if (map()->unused_property_fields() != actual_unused_property_fields) {
270 // This could actually happen in the middle of StoreTransitionStub 270 // This could actually happen in the middle of StoreTransitionStub
271 // when the new extended backing store is already set into the object and 271 // when the new extended backing store is already set into the object and
272 // the allocation of the MutableHeapNumber triggers GC (in this case map 272 // the allocation of the MutableHeapNumber triggers GC (in this case map
273 // is not updated yet). 273 // is not updated yet).
274 CHECK_EQ(map()->unused_property_fields(), 274 CHECK_EQ(map()->unused_property_fields(),
275 actual_unused_property_fields - JSObject::kFieldsAdded); 275 actual_unused_property_fields - JSObject::kFieldsAdded);
276 } 276 }
277 DescriptorArray* descriptors = map()->instance_descriptors(); 277 DescriptorArray* descriptors = map()->instance_descriptors();
278 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { 278 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) {
279 if (descriptors->GetDetails(i).type() == FIELD) { 279 if (descriptors->GetDetails(i).type() == DATA) {
280 Representation r = descriptors->GetDetails(i).representation(); 280 Representation r = descriptors->GetDetails(i).representation();
281 FieldIndex index = FieldIndex::ForDescriptor(map(), i); 281 FieldIndex index = FieldIndex::ForDescriptor(map(), i);
282 if (IsUnboxedDoubleField(index)) { 282 if (IsUnboxedDoubleField(index)) {
283 DCHECK(r.IsDouble()); 283 DCHECK(r.IsDouble());
284 continue; 284 continue;
285 } 285 }
286 Object* value = RawFastPropertyAt(index); 286 Object* value = RawFastPropertyAt(index);
287 if (r.IsDouble()) DCHECK(value->IsMutableHeapNumber()); 287 if (r.IsDouble()) DCHECK(value->IsMutableHeapNumber());
288 if (value->IsUninitialized()) continue; 288 if (value->IsUninitialized()) continue;
289 if (r.IsSmi()) DCHECK(value->IsSmi()); 289 if (r.IsSmi()) DCHECK(value->IsSmi());
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 return true; 1173 return true;
1174 } 1174 }
1175 1175
1176 1176
1177 bool LayoutDescriptor::IsConsistentWithMap(Map* map) { 1177 bool LayoutDescriptor::IsConsistentWithMap(Map* map) {
1178 if (FLAG_unbox_double_fields) { 1178 if (FLAG_unbox_double_fields) {
1179 DescriptorArray* descriptors = map->instance_descriptors(); 1179 DescriptorArray* descriptors = map->instance_descriptors();
1180 int nof_descriptors = map->NumberOfOwnDescriptors(); 1180 int nof_descriptors = map->NumberOfOwnDescriptors();
1181 for (int i = 0; i < nof_descriptors; i++) { 1181 for (int i = 0; i < nof_descriptors; i++) {
1182 PropertyDetails details = descriptors->GetDetails(i); 1182 PropertyDetails details = descriptors->GetDetails(i);
1183 if (details.type() != FIELD) continue; 1183 if (details.type() != DATA) continue;
1184 FieldIndex field_index = FieldIndex::ForDescriptor(map, i); 1184 FieldIndex field_index = FieldIndex::ForDescriptor(map, i);
1185 bool tagged_expected = 1185 bool tagged_expected =
1186 !field_index.is_inobject() || !details.representation().IsDouble(); 1186 !field_index.is_inobject() || !details.representation().IsDouble();
1187 for (int bit = 0; bit < details.field_width_in_words(); bit++) { 1187 for (int bit = 0; bit < details.field_width_in_words(); bit++) {
1188 bool tagged_actual = IsTagged(details.field_index() + bit); 1188 bool tagged_actual = IsTagged(details.field_index() + bit);
1189 DCHECK_EQ(tagged_expected, tagged_actual); 1189 DCHECK_EQ(tagged_expected, tagged_actual);
1190 if (tagged_actual != tagged_expected) return false; 1190 if (tagged_actual != tagged_expected) return false;
1191 } 1191 }
1192 } 1192 }
1193 } 1193 }
1194 return true; 1194 return true;
1195 } 1195 }
1196 1196
1197 1197
1198 bool TransitionArray::IsSortedNoDuplicates(int valid_entries) { 1198 bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
1199 DCHECK(valid_entries == -1); 1199 DCHECK(valid_entries == -1);
1200 Name* prev_key = NULL; 1200 Name* prev_key = NULL;
1201 PropertyKind prev_kind = DATA; 1201 PropertyKind prev_kind = kData;
1202 PropertyAttributes prev_attributes = NONE; 1202 PropertyAttributes prev_attributes = NONE;
1203 uint32_t prev_hash = 0; 1203 uint32_t prev_hash = 0;
1204 for (int i = 0; i < number_of_transitions(); i++) { 1204 for (int i = 0; i < number_of_transitions(); i++) {
1205 Name* key = GetSortedKey(i); 1205 Name* key = GetSortedKey(i);
1206 uint32_t hash = key->Hash(); 1206 uint32_t hash = key->Hash();
1207 PropertyKind kind = DATA; 1207 PropertyKind kind = kData;
1208 PropertyAttributes attributes = NONE; 1208 PropertyAttributes attributes = NONE;
1209 if (!IsSpecialTransition(key)) { 1209 if (!IsSpecialTransition(key)) {
1210 Map* target = GetTarget(i); 1210 Map* target = GetTarget(i);
1211 PropertyDetails details = GetTargetDetails(key, target); 1211 PropertyDetails details = GetTargetDetails(key, target);
1212 kind = details.kind(); 1212 kind = details.kind();
1213 attributes = details.attributes(); 1213 attributes = details.attributes();
1214 } else { 1214 } else {
1215 // Duplicate entries are not allowed for non-property transitions. 1215 // Duplicate entries are not allowed for non-property transitions.
1216 CHECK_NE(prev_key, key); 1216 CHECK_NE(prev_key, key);
1217 } 1217 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 while (map != heap->roots_array_start()[i++]) { 1258 while (map != heap->roots_array_start()[i++]) {
1259 CHECK_LT(i, Heap::kStrongRootListLength); 1259 CHECK_LT(i, Heap::kStrongRootListLength);
1260 } 1260 }
1261 } 1261 }
1262 } 1262 }
1263 1263
1264 1264
1265 #endif // DEBUG 1265 #endif // DEBUG
1266 1266
1267 } } // namespace v8::internal 1267 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698