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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 if (hash < current) { | 1165 if (hash < current) { |
1166 Print(); | 1166 Print(); |
1167 return false; | 1167 return false; |
1168 } | 1168 } |
1169 current = hash; | 1169 current = hash; |
1170 } | 1170 } |
1171 return true; | 1171 return true; |
1172 } | 1172 } |
1173 | 1173 |
1174 | 1174 |
1175 bool LayoutDescriptor::IsConsistentWithMap(Map* map) { | |
1176 if (FLAG_unbox_double_fields) { | |
1177 DescriptorArray* descriptors = map->instance_descriptors(); | |
1178 int nof_descriptors = map->NumberOfOwnDescriptors(); | |
1179 for (int i = 0; i < nof_descriptors; i++) { | |
1180 PropertyDetails details = descriptors->GetDetails(i); | |
1181 if (details.type() != DATA) continue; | |
1182 FieldIndex field_index = FieldIndex::ForDescriptor(map, i); | |
1183 bool tagged_expected = | |
1184 !field_index.is_inobject() || !details.representation().IsDouble(); | |
1185 for (int bit = 0; bit < details.field_width_in_words(); bit++) { | |
1186 bool tagged_actual = IsTagged(details.field_index() + bit); | |
1187 DCHECK_EQ(tagged_expected, tagged_actual); | |
1188 if (tagged_actual != tagged_expected) return false; | |
1189 } | |
1190 } | |
1191 } | |
1192 return true; | |
1193 } | |
1194 | |
1195 | |
1196 bool TransitionArray::IsSortedNoDuplicates(int valid_entries) { | 1175 bool TransitionArray::IsSortedNoDuplicates(int valid_entries) { |
1197 DCHECK(valid_entries == -1); | 1176 DCHECK(valid_entries == -1); |
1198 Name* prev_key = NULL; | 1177 Name* prev_key = NULL; |
1199 PropertyKind prev_kind = kData; | 1178 PropertyKind prev_kind = kData; |
1200 PropertyAttributes prev_attributes = NONE; | 1179 PropertyAttributes prev_attributes = NONE; |
1201 uint32_t prev_hash = 0; | 1180 uint32_t prev_hash = 0; |
1202 for (int i = 0; i < number_of_transitions(); i++) { | 1181 for (int i = 0; i < number_of_transitions(); i++) { |
1203 Name* key = GetSortedKey(i); | 1182 Name* key = GetSortedKey(i); |
1204 uint32_t hash = key->Hash(); | 1183 uint32_t hash = key->Hash(); |
1205 PropertyKind kind = kData; | 1184 PropertyKind kind = kData; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 ? it.rinfo()->target_cell() | 1259 ? it.rinfo()->target_cell() |
1281 : it.rinfo()->target_object(); | 1260 : it.rinfo()->target_object(); |
1282 CHECK(!CanLeak(target, heap, skip_weak_cell)); | 1261 CHECK(!CanLeak(target, heap, skip_weak_cell)); |
1283 } | 1262 } |
1284 } | 1263 } |
1285 | 1264 |
1286 | 1265 |
1287 #endif // DEBUG | 1266 #endif // DEBUG |
1288 | 1267 |
1289 } } // namespace v8::internal | 1268 } } // namespace v8::internal |
OLD | NEW |