OLD | NEW |
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 Loading... |
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_FIELD) { |
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 Loading... |
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_FIELD) 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 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |