OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 } | 748 } |
749 | 749 |
750 | 750 |
751 void JSFunctionProxy::JSFunctionProxyVerify() { | 751 void JSFunctionProxy::JSFunctionProxyVerify() { |
752 CHECK(IsJSFunctionProxy()); | 752 CHECK(IsJSFunctionProxy()); |
753 JSProxyVerify(); | 753 JSProxyVerify(); |
754 VerifyPointer(call_trap()); | 754 VerifyPointer(call_trap()); |
755 VerifyPointer(construct_trap()); | 755 VerifyPointer(construct_trap()); |
756 } | 756 } |
757 | 757 |
| 758 |
758 void JSArrayBuffer::JSArrayBufferVerify() { | 759 void JSArrayBuffer::JSArrayBufferVerify() { |
759 CHECK(IsJSArrayBuffer()); | 760 CHECK(IsJSArrayBuffer()); |
760 JSObjectVerify(); | 761 JSObjectVerify(); |
761 VerifyPointer(byte_length()); | 762 VerifyPointer(byte_length()); |
762 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() | 763 CHECK(byte_length()->IsSmi() || byte_length()->IsHeapNumber() |
763 || byte_length()->IsUndefined()); | 764 || byte_length()->IsUndefined()); |
764 } | 765 } |
765 | 766 |
766 | 767 |
767 void JSArrayBufferView::JSArrayBufferViewVerify() { | 768 void JSArrayBufferView::JSArrayBufferViewVerify() { |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 VerifyPointer(callback()); | 869 VerifyPointer(callback()); |
869 VerifyPointer(data()); | 870 VerifyPointer(data()); |
870 } | 871 } |
871 | 872 |
872 | 873 |
873 void TemplateInfo::TemplateInfoVerify() { | 874 void TemplateInfo::TemplateInfoVerify() { |
874 VerifyPointer(tag()); | 875 VerifyPointer(tag()); |
875 VerifyPointer(property_list()); | 876 VerifyPointer(property_list()); |
876 } | 877 } |
877 | 878 |
| 879 |
878 void FunctionTemplateInfo::FunctionTemplateInfoVerify() { | 880 void FunctionTemplateInfo::FunctionTemplateInfoVerify() { |
879 CHECK(IsFunctionTemplateInfo()); | 881 CHECK(IsFunctionTemplateInfo()); |
880 TemplateInfoVerify(); | 882 TemplateInfoVerify(); |
881 VerifyPointer(serial_number()); | 883 VerifyPointer(serial_number()); |
882 VerifyPointer(call_code()); | 884 VerifyPointer(call_code()); |
883 VerifyPointer(property_accessors()); | 885 VerifyPointer(property_accessors()); |
884 VerifyPointer(prototype_template()); | 886 VerifyPointer(prototype_template()); |
885 VerifyPointer(parent_template()); | 887 VerifyPointer(parent_template()); |
886 VerifyPointer(named_property_handler()); | 888 VerifyPointer(named_property_handler()); |
887 VerifyPointer(indexed_property_handler()); | 889 VerifyPointer(indexed_property_handler()); |
(...skipping 17 matching lines...) Expand all Loading... |
905 VerifyPointer(args()); | 907 VerifyPointer(args()); |
906 } | 908 } |
907 | 909 |
908 | 910 |
909 void TypeSwitchInfo::TypeSwitchInfoVerify() { | 911 void TypeSwitchInfo::TypeSwitchInfoVerify() { |
910 CHECK(IsTypeSwitchInfo()); | 912 CHECK(IsTypeSwitchInfo()); |
911 VerifyPointer(types()); | 913 VerifyPointer(types()); |
912 } | 914 } |
913 | 915 |
914 | 916 |
| 917 void AllocationSite::AllocationSiteVerify() { |
| 918 CHECK(IsAllocationSite()); |
| 919 } |
| 920 |
| 921 |
915 void AllocationSiteInfo::AllocationSiteInfoVerify() { | 922 void AllocationSiteInfo::AllocationSiteInfoVerify() { |
916 CHECK(IsAllocationSiteInfo()); | 923 CHECK(IsAllocationSiteInfo()); |
917 VerifyHeapPointer(payload()); | 924 VerifyHeapPointer(allocation_site()); |
918 CHECK(payload()->IsObject()); | 925 CHECK(!IsValid() || GetAllocationSite()->IsAllocationSite()); |
919 } | 926 } |
920 | 927 |
921 | 928 |
922 void Script::ScriptVerify() { | 929 void Script::ScriptVerify() { |
923 CHECK(IsScript()); | 930 CHECK(IsScript()); |
924 VerifyPointer(source()); | 931 VerifyPointer(source()); |
925 VerifyPointer(name()); | 932 VerifyPointer(name()); |
926 line_offset()->SmiVerify(); | 933 line_offset()->SmiVerify(); |
927 column_offset()->SmiVerify(); | 934 column_offset()->SmiVerify(); |
928 VerifyPointer(data()); | 935 VerifyPointer(data()); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 number_of_fast_used_fields_ = 0; | 1070 number_of_fast_used_fields_ = 0; |
1064 number_of_fast_unused_fields_ = 0; | 1071 number_of_fast_unused_fields_ = 0; |
1065 number_of_slow_used_properties_ = 0; | 1072 number_of_slow_used_properties_ = 0; |
1066 number_of_slow_unused_properties_ = 0; | 1073 number_of_slow_unused_properties_ = 0; |
1067 number_of_fast_used_elements_ = 0; | 1074 number_of_fast_used_elements_ = 0; |
1068 number_of_fast_unused_elements_ = 0; | 1075 number_of_fast_unused_elements_ = 0; |
1069 number_of_slow_used_elements_ = 0; | 1076 number_of_slow_used_elements_ = 0; |
1070 number_of_slow_unused_elements_ = 0; | 1077 number_of_slow_unused_elements_ = 0; |
1071 } | 1078 } |
1072 | 1079 |
| 1080 |
1073 void JSObject::SpillInformation::Print() { | 1081 void JSObject::SpillInformation::Print() { |
1074 PrintF("\n JSObject Spill Statistics (#%d):\n", number_of_objects_); | 1082 PrintF("\n JSObject Spill Statistics (#%d):\n", number_of_objects_); |
1075 | 1083 |
1076 PrintF(" - fast properties (#%d): %d (used) %d (unused)\n", | 1084 PrintF(" - fast properties (#%d): %d (used) %d (unused)\n", |
1077 number_of_objects_with_fast_properties_, | 1085 number_of_objects_with_fast_properties_, |
1078 number_of_fast_used_fields_, number_of_fast_unused_fields_); | 1086 number_of_fast_used_fields_, number_of_fast_unused_fields_); |
1079 | 1087 |
1080 PrintF(" - slow properties (#%d): %d (used) %d (unused)\n", | 1088 PrintF(" - slow properties (#%d): %d (used) %d (unused)\n", |
1081 number_of_objects_ - number_of_objects_with_fast_properties_, | 1089 number_of_objects_ - number_of_objects_with_fast_properties_, |
1082 number_of_slow_used_properties_, number_of_slow_unused_properties_); | 1090 number_of_slow_used_properties_, number_of_slow_unused_properties_); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 for (int i = 0; i < number_of_transitions(); ++i) { | 1158 for (int i = 0; i < number_of_transitions(); ++i) { |
1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1159 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1152 } | 1160 } |
1153 return true; | 1161 return true; |
1154 } | 1162 } |
1155 | 1163 |
1156 | 1164 |
1157 #endif // DEBUG | 1165 #endif // DEBUG |
1158 | 1166 |
1159 } } // namespace v8::internal | 1167 } } // namespace v8::internal |
OLD | NEW |