19 void Object::ObjectVerify() {
21 Smi::cast(
this)->SmiVerify();
23 HeapObject::cast(
this)->HeapObjectVerify();
28 void Object::VerifyPointer(
Object* p) {
29 if (p->IsHeapObject()) {
30 HeapObject::VerifyHeapPointer(p);
37 void Smi::SmiVerify() {
42 void HeapObject::HeapObjectVerify() {
46 String::cast(
this)->StringVerify();
50 switch (instance_type) {
52 Symbol::cast(
this)->SymbolVerify();
55 Map::cast(
this)->MapVerify();
59 HeapNumber::cast(
this)->HeapNumberVerify();
62 FixedArray::cast(
this)->FixedArrayVerify();
65 FixedDoubleArray::cast(
this)->FixedDoubleArrayVerify();
68 ConstantPoolArray::cast(
this)->ConstantPoolArrayVerify();
71 ByteArray::cast(
this)->ByteArrayVerify();
74 FreeSpace::cast(
this)->FreeSpaceVerify();
77 #define VERIFY_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
78 case EXTERNAL_##TYPE##_ARRAY_TYPE: \
79 External##Type##Array::cast(this)->External##Type##ArrayVerify(); \
81 case FIXED_##TYPE##_ARRAY_TYPE: \
82 Fixed##Type##Array::cast(this)->FixedTypedArrayVerify(); \
86 #undef VERIFY_TYPED_ARRAY
89 Code::cast(
this)->CodeVerify();
92 Oddball::cast(
this)->OddballVerify();
96 JSObject::cast(
this)->JSObjectVerify();
99 JSGeneratorObject::cast(
this)->JSGeneratorObjectVerify();
102 JSModule::cast(
this)->JSModuleVerify();
105 JSValue::cast(
this)->JSValueVerify();
108 JSDate::cast(
this)->JSDateVerify();
111 JSFunction::cast(
this)->JSFunctionVerify();
114 JSGlobalProxy::cast(
this)->JSGlobalProxyVerify();
117 JSGlobalObject::cast(
this)->JSGlobalObjectVerify();
120 JSBuiltinsObject::cast(
this)->JSBuiltinsObjectVerify();
123 Cell::cast(
this)->CellVerify();
126 PropertyCell::cast(
this)->PropertyCellVerify();
129 JSArray::cast(
this)->JSArrayVerify();
132 JSSet::cast(
this)->JSSetVerify();
135 JSMap::cast(
this)->JSMapVerify();
138 JSSetIterator::cast(
this)->JSSetIteratorVerify();
141 JSMapIterator::cast(
this)->JSMapIteratorVerify();
144 JSWeakMap::cast(
this)->JSWeakMapVerify();
147 JSWeakSet::cast(
this)->JSWeakSetVerify();
150 JSRegExp::cast(
this)->JSRegExpVerify();
155 JSProxy::cast(
this)->JSProxyVerify();
158 JSFunctionProxy::cast(
this)->JSFunctionProxyVerify();
161 Foreign::cast(
this)->ForeignVerify();
164 SharedFunctionInfo::cast(
this)->SharedFunctionInfoVerify();
167 JSMessageObject::cast(
this)->JSMessageObjectVerify();
170 JSArrayBuffer::cast(
this)->JSArrayBufferVerify();
173 JSTypedArray::cast(
this)->JSTypedArrayVerify();
176 JSDataView::cast(
this)->JSDataViewVerify();
179 #define MAKE_STRUCT_CASE(NAME, Name, name) \
181 Name::cast(this)->Name##Verify(); \
184 #undef MAKE_STRUCT_CASE
193 void HeapObject::VerifyHeapPointer(
Object* p) {
194 CHECK(p->IsHeapObject());
195 HeapObject* ho = HeapObject::cast(p);
196 CHECK(ho->GetHeap()->Contains(ho));
200 void Symbol::SymbolVerify() {
209 void HeapNumber::HeapNumberVerify() {
210 CHECK(IsHeapNumber() || IsMutableHeapNumber());
214 void ByteArray::ByteArrayVerify() {
215 CHECK(IsByteArray());
219 void FreeSpace::FreeSpaceVerify() {
220 CHECK(IsFreeSpace());
224 #define EXTERNAL_ARRAY_VERIFY(Type, type, TYPE, ctype, size) \
225 void External##Type##Array::External##Type##ArrayVerify() { \
226 CHECK(IsExternal##Type##Array()); \
230 #undef EXTERNAL_ARRAY_VERIFY
233 template <
class Traits>
234 void FixedTypedArray<Traits>::FixedTypedArrayVerify() {
235 CHECK(IsHeapObject() &&
236 HeapObject::cast(
this)->
map()->instance_type() ==
237 Traits::kInstanceType);
241 bool JSObject::ElementsAreSafeToExamine() {
244 return reinterpret_cast<Map*
>(elements()) !=
245 GetHeap()->one_pointer_filler_map();
249 void JSObject::JSObjectVerify() {
250 VerifyHeapPointer(properties());
251 VerifyHeapPointer(elements());
254 CHECK(this->elements()->IsFixedArray());
255 CHECK_GE(this->elements()->length(), 2);
260 (
map()->inobject_properties() + properties()->length() -
261 map()->NextFreePropertyIndex()));
262 DescriptorArray* descriptors =
map()->instance_descriptors();
264 if (descriptors->GetDetails(
i).type() ==
FIELD) {
265 Representation r = descriptors->GetDetails(
i).representation();
266 FieldIndex index = FieldIndex::ForDescriptor(
map(),
i);
268 if (r.IsDouble())
DCHECK(value->IsMutableHeapNumber());
269 if (value->IsUninitialized())
continue;
270 if (r.IsSmi())
DCHECK(value->IsSmi());
271 if (r.IsHeapObject())
DCHECK(value->IsHeapObject());
272 HeapType* field_type = descriptors->GetFieldType(
i);
275 }
else if (!HeapType::Any()->
Is(field_type)) {
276 CHECK(!field_type->NowStable() || field_type->NowContains(value));
284 if (ElementsAreSafeToExamine()) {
285 CHECK_EQ((
map()->has_fast_smi_or_object_elements() ||
286 (elements() ==
GetHeap()->empty_fixed_array())),
287 (elements()->
map() ==
GetHeap()->fixed_array_map() ||
288 elements()->
map() ==
GetHeap()->fixed_cow_array_map()));
294 void Map::MapVerify() {
296 CHECK(!heap->InNewSpace(
this));
301 VerifyHeapPointer(prototype());
302 VerifyHeapPointer(instance_descriptors());
303 SLOW_DCHECK(instance_descriptors()->IsSortedNoDuplicates());
305 SLOW_DCHECK(transitions()->IsSortedNoDuplicates());
306 SLOW_DCHECK(transitions()->IsConsistentWithBackPointers(
this));
311 void Map::DictionaryMapVerify() {
314 CHECK(instance_descriptors()->IsEmpty());
322 void Map::VerifyOmittedMapChecks() {
323 if (!FLAG_omit_map_checks_for_leaf_maps)
return;
334 void CodeCache::CodeCacheVerify() {
335 VerifyHeapPointer(default_cache());
336 VerifyHeapPointer(normal_type_cache());
337 CHECK(default_cache()->IsFixedArray());
338 CHECK(normal_type_cache()->IsUndefined()
339 || normal_type_cache()->IsCodeCacheHashTable());
343 void PolymorphicCodeCache::PolymorphicCodeCacheVerify() {
344 VerifyHeapPointer(cache());
345 CHECK(cache()->IsUndefined() || cache()->IsPolymorphicCodeCacheHashTable());
349 void TypeFeedbackInfo::TypeFeedbackInfoVerify() {
356 void AliasedArgumentsEntry::AliasedArgumentsEntryVerify() {
361 void FixedArray::FixedArrayVerify() {
369 void FixedDoubleArray::FixedDoubleArrayVerify() {
373 CHECK(!std::isnan(value) ||
374 (bit_cast<uint64_t>(value) ==
382 void ConstantPoolArray::ConstantPoolArrayVerify() {
383 CHECK(IsConstantPoolArray());
385 while (!code_iter.is_finished()) {
390 while (!heap_iter.is_finished()) {
396 void JSGeneratorObject::JSGeneratorObjectVerify() {
409 void JSModule::JSModuleVerify() {
412 CHECK(context()->IsUndefined() ||
417 void JSValue::JSValueVerify() {
419 if (v->IsHeapObject()) {
420 VerifyHeapPointer(v);
425 void JSDate::JSDateVerify() {
426 if (value()->IsHeapObject()) {
427 VerifyHeapPointer(value());
429 CHECK(value()->IsUndefined() || value()->IsSmi() || value()->IsHeapNumber());
430 CHECK(year()->IsUndefined() || year()->IsSmi() || year()->IsNaN());
431 CHECK(month()->IsUndefined() || month()->IsSmi() || month()->IsNaN());
432 CHECK(day()->IsUndefined() || day()->IsSmi() || day()->IsNaN());
433 CHECK(weekday()->IsUndefined() || weekday()->IsSmi() || weekday()->IsNaN());
434 CHECK(hour()->IsUndefined() || hour()->IsSmi() || hour()->IsNaN());
436 CHECK(sec()->IsUndefined() || sec()->IsSmi() || sec()->IsNaN());
437 CHECK(cache_stamp()->IsUndefined() ||
438 cache_stamp()->IsSmi() ||
439 cache_stamp()->IsNaN());
441 if (month()->IsSmi()) {
442 int month = Smi::cast(this->month())->value();
443 CHECK(0 <= month && month <= 11);
445 if (day()->IsSmi()) {
446 int day = Smi::cast(this->day())->value();
447 CHECK(1 <= day && day <= 31);
449 if (hour()->IsSmi()) {
450 int hour = Smi::cast(this->hour())->value();
451 CHECK(0 <= hour && hour <= 23);
453 if (
min()->IsSmi()) {
454 int min = Smi::cast(this->
min())->value();
457 if (sec()->IsSmi()) {
458 int sec = Smi::cast(this->sec())->value();
459 CHECK(0 <= sec && sec <= 59);
461 if (weekday()->IsSmi()) {
462 int weekday = Smi::cast(this->weekday())->value();
463 CHECK(0 <= weekday && weekday <= 6);
465 if (cache_stamp()->IsSmi()) {
466 CHECK(Smi::cast(cache_stamp())->value() <=
467 Smi::cast(
GetIsolate()->date_cache()->stamp())->value());
472 void JSMessageObject::JSMessageObjectVerify() {
473 CHECK(IsJSMessageObject());
474 CHECK(type()->IsString());
475 CHECK(arguments()->IsJSArray());
484 void String::StringVerify() {
487 if (IsInternalizedString()) {
490 if (IsConsString()) {
491 ConsString::cast(
this)->ConsStringVerify();
492 }
else if (IsSlicedString()) {
493 SlicedString::cast(
this)->SlicedStringVerify();
498 void ConsString::ConsStringVerify() {
501 this->
second()->IsString());
507 CHECK(this->
first()->IsSeqString() || this->
first()->IsExternalString());
512 void SlicedString::SlicedStringVerify() {
519 void JSFunction::JSFunctionVerify() {
520 CHECK(IsJSFunction());
525 next_function_link()->IsUndefined() ||
526 next_function_link()->IsJSFunction());
530 void SharedFunctionInfo::SharedFunctionInfoVerify() {
531 CHECK(IsSharedFunctionInfo());
544 void JSGlobalProxy::JSGlobalProxyVerify() {
545 CHECK(IsJSGlobalProxy());
549 CHECK_EQ(0, properties()->length());
551 CHECK_EQ(0, FixedArray::cast(elements())->length());
555 void JSGlobalObject::JSGlobalObjectVerify() {
556 CHECK(IsJSGlobalObject());
561 VerifyObjectField(
i);
566 void JSBuiltinsObject::JSBuiltinsObjectVerify() {
567 CHECK(IsJSBuiltinsObject());
572 VerifyObjectField(
i);
577 void Oddball::OddballVerify() {
580 VerifyHeapPointer(to_string());
581 Object* number = to_number();
582 if (number->IsHeapObject()) {
583 CHECK(number == heap->nan_value());
585 CHECK(number->IsSmi());
586 int value = Smi::cast(number)->value();
588 const int kLeastHiddenOddballNumber = -5;
590 CHECK(value >= kLeastHiddenOddballNumber);
592 if (
map() == heap->undefined_map()) {
593 CHECK(
this == heap->undefined_value());
594 }
else if (
map() == heap->the_hole_map()) {
595 CHECK(
this == heap->the_hole_value());
596 }
else if (
map() == heap->null_map()) {
597 CHECK(
this == heap->null_value());
598 }
else if (
map() == heap->boolean_map()) {
599 CHECK(
this == heap->true_value() ||
600 this == heap->false_value());
601 }
else if (
map() == heap->uninitialized_map()) {
602 CHECK(
this == heap->uninitialized_value());
603 }
else if (
map() == heap->no_interceptor_result_sentinel_map()) {
604 CHECK(
this == heap->no_interceptor_result_sentinel());
605 }
else if (
map() == heap->arguments_marker_map()) {
606 CHECK(
this == heap->arguments_marker());
607 }
else if (
map() == heap->termination_exception_map()) {
608 CHECK(
this == heap->termination_exception());
609 }
else if (
map() == heap->exception_map()) {
610 CHECK(
this == heap->exception());
617 void Cell::CellVerify() {
623 void PropertyCell::PropertyCellVerify() {
624 CHECK(IsPropertyCell());
630 void Code::CodeVerify() {
633 relocation_info()->ObjectVerify();
637 it.rinfo()->Verify(isolate);
640 CHECK(it.rinfo()->pc() != last_gc_pc);
641 last_gc_pc = it.rinfo()->pc();
649 void Code::VerifyEmbeddedObjectsDependency() {
653 HandleScope scope(isolate);
655 for (
RelocIterator it(
this, mode_mask); !it.done(); it.next()) {
656 Object* obj = it.rinfo()->target_object();
659 Map*
map = Map::cast(obj);
662 CHECK(
map->dependent_code()->Contains(group,
this));
663 }
else if (obj->IsJSObject()) {
665 WeakHashTable* table = WeakHashTable::cast(raw_table);
666 Handle<Object> key_obj(obj, isolate);
667 CHECK(DependentCode::cast(table->Lookup(key_obj))->Contains(
675 void JSArray::JSArrayVerify() {
677 CHECK(length()->IsNumber() || length()->IsUndefined());
680 if (ElementsAreSafeToExamine()) {
681 CHECK(elements()->IsUndefined() ||
682 elements()->IsFixedArray() ||
683 elements()->IsFixedDoubleArray());
688 void JSSet::JSSetVerify() {
691 VerifyHeapPointer(table());
692 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined());
697 void JSMap::JSMapVerify() {
700 VerifyHeapPointer(table());
701 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined());
706 void JSSetIterator::JSSetIteratorVerify() {
707 CHECK(IsJSSetIterator());
709 VerifyHeapPointer(table());
710 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined());
711 CHECK(index()->IsSmi() || index()->IsUndefined());
712 CHECK(kind()->IsSmi() || kind()->IsUndefined());
716 void JSMapIterator::JSMapIteratorVerify() {
717 CHECK(IsJSMapIterator());
719 VerifyHeapPointer(table());
720 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined());
721 CHECK(index()->IsSmi() || index()->IsUndefined());
722 CHECK(kind()->IsSmi() || kind()->IsUndefined());
726 void JSWeakMap::JSWeakMapVerify() {
727 CHECK(IsJSWeakMap());
729 VerifyHeapPointer(table());
730 CHECK(table()->IsHashTable() || table()->IsUndefined());
734 void JSWeakSet::JSWeakSetVerify() {
735 CHECK(IsJSWeakSet());
737 VerifyHeapPointer(table());
738 CHECK(table()->IsHashTable() || table()->IsUndefined());
742 void JSRegExp::JSRegExpVerify() {
744 CHECK(data()->IsUndefined() || data()->IsFixedArray());
747 FixedArray* arr = FixedArray::cast(data());
754 FixedArray* arr = FixedArray::cast(data());
760 one_byte_data->IsSmi() ||
761 (is_native ? one_byte_data->IsCode() : one_byte_data->IsByteArray()));
763 CHECK(uc16_data->IsSmi() ||
764 (is_native ? uc16_data->IsCode() : uc16_data->IsByteArray()));
768 CHECK(one_byte_saved->IsSmi() || one_byte_saved->IsString() ||
769 one_byte_saved->IsCode());
771 CHECK(uc16_saved->IsSmi() || uc16_saved->IsString() ||
772 uc16_saved->IsCode());
780 CHECK(data()->IsUndefined());
786 void JSProxy::JSProxyVerify() {
788 VerifyPointer(handler());
789 CHECK(hash()->IsSmi() || hash()->IsUndefined());
793 void JSFunctionProxy::JSFunctionProxyVerify() {
794 CHECK(IsJSFunctionProxy());
796 VerifyPointer(call_trap());
797 VerifyPointer(construct_trap());
801 void JSArrayBuffer::JSArrayBufferVerify() {
802 CHECK(IsJSArrayBuffer());
804 VerifyPointer(byte_length());
805 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber()
806 || byte_length()->IsUndefined());
810 void JSArrayBufferView::JSArrayBufferViewVerify() {
811 CHECK(IsJSArrayBufferView());
813 VerifyPointer(buffer());
814 CHECK(buffer()->IsJSArrayBuffer() || buffer()->IsUndefined()
817 VerifyPointer(byte_offset());
818 CHECK(byte_offset()->IsSmi() || byte_offset()->IsHeapNumber()
819 || byte_offset()->IsUndefined());
821 VerifyPointer(byte_length());
822 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber()
823 || byte_length()->IsUndefined());
827 void JSTypedArray::JSTypedArrayVerify() {
828 CHECK(IsJSTypedArray());
829 JSArrayBufferViewVerify();
830 VerifyPointer(length());
831 CHECK(length()->IsSmi() || length()->IsHeapNumber()
832 || length()->IsUndefined());
834 VerifyPointer(elements());
838 void JSDataView::JSDataViewVerify() {
839 CHECK(IsJSDataView());
840 JSArrayBufferViewVerify();
844 void Foreign::ForeignVerify() {
849 void Box::BoxVerify() {
851 value()->ObjectVerify();
855 void AccessorInfo::AccessorInfoVerify() {
856 VerifyPointer(
name());
857 VerifyPointer(
flag());
858 VerifyPointer(expected_receiver_type());
862 void ExecutableAccessorInfo::ExecutableAccessorInfoVerify() {
863 CHECK(IsExecutableAccessorInfo());
864 AccessorInfoVerify();
865 VerifyPointer(getter());
866 VerifyPointer(setter());
867 VerifyPointer(data());
871 void DeclaredAccessorDescriptor::DeclaredAccessorDescriptorVerify() {
872 CHECK(IsDeclaredAccessorDescriptor());
877 void DeclaredAccessorInfo::DeclaredAccessorInfoVerify() {
878 CHECK(IsDeclaredAccessorInfo());
879 AccessorInfoVerify();
880 VerifyPointer(descriptor());
884 void AccessorPair::AccessorPairVerify() {
885 CHECK(IsAccessorPair());
886 VerifyPointer(getter());
887 VerifyPointer(setter());
891 void AccessCheckInfo::AccessCheckInfoVerify() {
892 CHECK(IsAccessCheckInfo());
893 VerifyPointer(named_callback());
894 VerifyPointer(indexed_callback());
895 VerifyPointer(data());
899 void InterceptorInfo::InterceptorInfoVerify() {
900 CHECK(IsInterceptorInfo());
901 VerifyPointer(getter());
902 VerifyPointer(setter());
903 VerifyPointer(query());
904 VerifyPointer(deleter());
905 VerifyPointer(enumerator());
906 VerifyPointer(data());
910 void CallHandlerInfo::CallHandlerInfoVerify() {
911 CHECK(IsCallHandlerInfo());
912 VerifyPointer(callback());
913 VerifyPointer(data());
917 void TemplateInfo::TemplateInfoVerify() {
918 VerifyPointer(tag());
919 VerifyPointer(property_list());
920 VerifyPointer(property_accessors());
924 void FunctionTemplateInfo::FunctionTemplateInfoVerify() {
925 CHECK(IsFunctionTemplateInfo());
926 TemplateInfoVerify();
927 VerifyPointer(serial_number());
928 VerifyPointer(call_code());
930 VerifyPointer(parent_template());
931 VerifyPointer(named_property_handler());
933 VerifyPointer(instance_template());
934 VerifyPointer(signature());
935 VerifyPointer(access_check_info());
939 void ObjectTemplateInfo::ObjectTemplateInfoVerify() {
940 CHECK(IsObjectTemplateInfo());
941 TemplateInfoVerify();
942 VerifyPointer(constructor());
947 void SignatureInfo::SignatureInfoVerify() {
948 CHECK(IsSignatureInfo());
949 VerifyPointer(receiver());
950 VerifyPointer(args());
954 void TypeSwitchInfo::TypeSwitchInfoVerify() {
955 CHECK(IsTypeSwitchInfo());
956 VerifyPointer(types());
960 void AllocationSite::AllocationSiteVerify() {
961 CHECK(IsAllocationSite());
965 void AllocationMemento::AllocationMementoVerify() {
966 CHECK(IsAllocationMemento());
967 VerifyHeapPointer(allocation_site());
972 void Script::ScriptVerify() {
974 VerifyPointer(source());
975 VerifyPointer(
name());
976 line_offset()->SmiVerify();
977 column_offset()->SmiVerify();
978 VerifyPointer(wrapper());
980 VerifyPointer(line_ends());
985 void JSFunctionResultCache::JSFunctionResultCacheVerify() {
1001 get(
i)->ObjectVerify();
1005 get(
i)->ObjectVerify();
1011 void NormalizedMapCache::NormalizedMapCacheVerify() {
1012 FixedArray::cast(
this)->FixedArrayVerify();
1017 Map::cast(e)->DictionaryMapVerify();
1019 CHECK(e->IsUndefined());
1026 void DebugInfo::DebugInfoVerify() {
1027 CHECK(IsDebugInfo());
1028 VerifyPointer(shared());
1029 VerifyPointer(original_code());
1030 VerifyPointer(code());
1031 VerifyPointer(break_points());
1035 void BreakPointInfo::BreakPointInfoVerify() {
1036 CHECK(IsBreakPointInfo());
1037 code_position()->SmiVerify();
1038 source_position()->SmiVerify();
1039 statement_position()->SmiVerify();
1040 VerifyPointer(break_point_objects());
1046 void JSObject::IncrementSpillStatistics(SpillInformation* info) {
1047 info->number_of_objects_++;
1050 info->number_of_objects_with_fast_properties_++;
1055 info->number_of_slow_used_properties_ += dict->NumberOfElements();
1056 info->number_of_slow_unused_properties_ +=
1057 dict->Capacity() - dict->NumberOfElements();
1067 info->number_of_objects_with_fast_elements_++;
1069 FixedArray* e = FixedArray::cast(elements());
1070 int len = e->length();
1072 for (
int i = 0;
i < len;
i++) {
1073 if (e->get(
i) == heap->the_hole_value()) holes++;
1075 info->number_of_fast_used_elements_ += len - holes;
1076 info->number_of_fast_unused_elements_ += holes;
1080 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
1081 case EXTERNAL_##TYPE##_ELEMENTS: \
1082 case TYPE##_ELEMENTS:
1085 #undef TYPED_ARRAY_CASE
1086 { info->number_of_objects_with_fast_elements_++;
1087 FixedArrayBase* e = FixedArrayBase::cast(elements());
1088 info->number_of_fast_used_elements_ += e->length();
1093 info->number_of_slow_used_elements_ += dict->NumberOfElements();
1094 info->number_of_slow_unused_elements_ +=
1095 dict->Capacity() - dict->NumberOfElements();
1104 void JSObject::SpillInformation::Clear() {
1105 number_of_objects_ = 0;
1106 number_of_objects_with_fast_properties_ = 0;
1107 number_of_objects_with_fast_elements_ = 0;
1108 number_of_fast_used_fields_ = 0;
1109 number_of_fast_unused_fields_ = 0;
1110 number_of_slow_used_properties_ = 0;
1111 number_of_slow_unused_properties_ = 0;
1112 number_of_fast_used_elements_ = 0;
1113 number_of_fast_unused_elements_ = 0;
1114 number_of_slow_used_elements_ = 0;
1115 number_of_slow_unused_elements_ = 0;
1119 void JSObject::SpillInformation::Print() {
1120 PrintF(
"\n JSObject Spill Statistics (#%d):\n", number_of_objects_);
1122 PrintF(
" - fast properties (#%d): %d (used) %d (unused)\n",
1123 number_of_objects_with_fast_properties_,
1124 number_of_fast_used_fields_, number_of_fast_unused_fields_);
1126 PrintF(
" - slow properties (#%d): %d (used) %d (unused)\n",
1127 number_of_objects_ - number_of_objects_with_fast_properties_,
1128 number_of_slow_used_properties_, number_of_slow_unused_properties_);
1130 PrintF(
" - fast elements (#%d): %d (used) %d (unused)\n",
1131 number_of_objects_with_fast_elements_,
1132 number_of_fast_used_elements_, number_of_fast_unused_elements_);
1134 PrintF(
" - slow elements (#%d): %d (used) %d (unused)\n",
1135 number_of_objects_ - number_of_objects_with_fast_elements_,
1136 number_of_slow_used_elements_, number_of_slow_unused_elements_);
1142 bool DescriptorArray::IsSortedNoDuplicates(
int valid_entries) {
1144 Name* current_key =
NULL;
1148 if (key == current_key) {
1149 OFStream os(stdout);
1150 PrintDescriptors(os);
1155 if (hash < current) {
1156 OFStream os(stdout);
1157 PrintDescriptors(os);
1166 bool TransitionArray::IsSortedNoDuplicates(
int valid_entries) {
1167 DCHECK(valid_entries == -1);
1168 Name* current_key =
NULL;
1172 if (key == current_key) {
1173 OFStream os(stdout);
1174 PrintTransitions(os);
1179 if (hash < current) {
1180 OFStream os(stdout);
1181 PrintTransitions(os);
1190 static bool CheckOneBackPointer(Map* current_map,
Object* target) {
1191 return !target->IsMap() || Map::cast(target)->GetBackPointer() == current_map;
1195 bool TransitionArray::IsConsistentWithBackPointers(Map* current_map) {
1197 if (!CheckOneBackPointer(current_map,
GetTarget(
i)))
return false;
#define SLOW_DCHECK(condition)
static const int kAliasedContextSlot
AllocationSite * GetAllocationSite()
static const int kValueOffset
bool CanContainWeakObjects()
static Code * GetCodeFromTargetAddress(Address address)
friend class RelocIterator
bool IsWeakObject(Object *object)
byte * instruction_start()
static const int kMinLength
Address get_code_ptr_entry(int index)
int OffsetOfElementAt(int index)
static Context * cast(Object *context)
Name * GetSortedKey(int descriptor_number)
int number_of_descriptors()
static const uint64_t kSignMask
static double canonical_not_the_hole_nan_as_double()
bool is_the_hole(int index)
double get_scalar(int index)
static const int kBuiltinsOffset
Isolate * GetIsolate() const
Object * weak_object_to_code_table()
static const int kEntriesIndex
static const int kFactoryIndex
static const int kEntrySize
static const int kCacheSizeIndex
static const int kFingerIndex
static const int kNextFunctionLinkOffset
static const int kPrototypeOrInitialMapOffset
static const int kFunctionOffset
static const int kOperandStackOffset
static const int kReceiverOffset
static const int kContextOffset
static const int kStackHandlerIndexOffset
static const int kContinuationOffset
static const int kNativeContextOffset
static const int kScriptOffset
static const int kStartPositionOffset
static const int kEndPositionOffset
static const int kStackFramesOffset
static const int kArgumentsOffset
static const int kContextOffset
static const int kScopeInfoOffset
bool HasFastObjectElements()
SeededNumberDictionary * element_dictionary()
ElementsKind GetElementsKind()
Object * RawFastPropertyAt(FieldIndex index)
NameDictionary * property_dictionary()
static const int kIrregexpUC16CodeSavedIndex
static const int kIrregexpCaptureCountIndex
static const int kIrregexpUC16CodeIndex
static const int kAtomPatternIndex
static const int kIrregexpMaxRegisterCountIndex
static const int kIrregexpLatin1CodeIndex
static const int kIrregexpLatin1CodeSavedIndex
int NumberOfOwnDescriptors()
int unused_property_fields()
int pre_allocated_property_fields()
int NextFreePropertyIndex()
InstanceType instance_type()
bool HasTransitionArray() const
static const int kTypeOffset
static bool UsesNativeRegExp()
static int ModeMask(Mode mode)
static bool IsGCRelocMode(Mode mode)
static const int kOptimizedCodeMapOffset
static const int kScriptOffset
static const int kDebugInfoOffset
static const int kFeedbackVectorOffset
static const int kScopeInfoOffset
static const int kNameOffset
static const int kInstanceClassNameOffset
static const int kCodeOffset
static const int kFunctionDataOffset
static const int kMinLength
static const int kMaxValue
static Smi * FromInt(int value)
static VisitorId GetVisitorId(int instance_type, int instance_size)
int number_of_transitions()
Name * GetSortedKey(int transition_number)
Map * GetTarget(int transition_number)
static const int kStorage2Offset
static const int kStorage3Offset
static const int kStorage1Offset
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define CHECK_EQ(expected, value)
#define DCHECK(condition)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset internal_field_count
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
kSerializedDataOffset kPrototypeTemplateOffset indexed_property_handler
static int min(int a, int b)
const intptr_t kCodeAlignment
kSerializedDataOffset Object
TypeImpl< HeapTypeConfig > HeapType
@ FIXED_DOUBLE_ARRAY_TYPE
@ JS_GENERATOR_OBJECT_TYPE
@ JS_CONTEXT_EXTENSION_OBJECT_TYPE
@ MUTABLE_HEAP_NUMBER_TYPE
@ SHARED_FUNCTION_INFO_TYPE
@ JS_BUILTINS_OBJECT_TYPE
@ CONSTANT_POOL_ARRAY_TYPE
@ FAST_HOLEY_DOUBLE_ELEMENTS
@ SLOPPY_ARGUMENTS_ELEMENTS
@ FAST_HOLEY_SMI_ELEMENTS
const int kVariableSizeSentinel
const bool FLAG_enable_slow_asserts
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset dependent_code
void PrintF(const char *format,...)
kFeedbackVectorOffset flag
kSerializedDataOffset prototype_template
bool IsAligned(T value, U alignment)
Debugger support for the V8 JavaScript engine.
#define MAKE_STRUCT_CASE(NAME, Name, name)