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

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

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return (FLAG_use_gvn && FLAG_use_allocation_folding) || 267 return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
268 reinterpret_cast<Map*>(elements()) != 268 reinterpret_cast<Map*>(elements()) !=
269 GetHeap()->one_pointer_filler_map(); 269 GetHeap()->one_pointer_filler_map();
270 } 270 }
271 271
272 272
273 void JSObject::JSObjectVerify() { 273 void JSObject::JSObjectVerify() {
274 VerifyHeapPointer(properties()); 274 VerifyHeapPointer(properties());
275 VerifyHeapPointer(elements()); 275 VerifyHeapPointer(elements());
276 276
277 if (GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS) { 277 if (GetElementsKind() == SLOPPY_ARGUMENTS_ELEMENTS) {
278 CHECK(this->elements()->IsFixedArray()); 278 CHECK(this->elements()->IsFixedArray());
279 CHECK_GE(this->elements()->length(), 2); 279 CHECK_GE(this->elements()->length(), 2);
280 } 280 }
281 281
282 if (HasFastProperties()) { 282 if (HasFastProperties()) {
283 CHECK_EQ(map()->unused_property_fields(), 283 CHECK_EQ(map()->unused_property_fields(),
284 (map()->inobject_properties() + properties()->length() - 284 (map()->inobject_properties() + properties()->length() -
285 map()->NextFreePropertyIndex())); 285 map()->NextFreePropertyIndex()));
286 DescriptorArray* descriptors = map()->instance_descriptors(); 286 DescriptorArray* descriptors = map()->instance_descriptors();
287 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) { 287 for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) {
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 info->number_of_fast_used_elements_ += e->length(); 1046 info->number_of_fast_used_elements_ += e->length();
1047 break; 1047 break;
1048 } 1048 }
1049 case DICTIONARY_ELEMENTS: { 1049 case DICTIONARY_ELEMENTS: {
1050 SeededNumberDictionary* dict = element_dictionary(); 1050 SeededNumberDictionary* dict = element_dictionary();
1051 info->number_of_slow_used_elements_ += dict->NumberOfElements(); 1051 info->number_of_slow_used_elements_ += dict->NumberOfElements();
1052 info->number_of_slow_unused_elements_ += 1052 info->number_of_slow_unused_elements_ +=
1053 dict->Capacity() - dict->NumberOfElements(); 1053 dict->Capacity() - dict->NumberOfElements();
1054 break; 1054 break;
1055 } 1055 }
1056 case NON_STRICT_ARGUMENTS_ELEMENTS: 1056 case SLOPPY_ARGUMENTS_ELEMENTS:
1057 break; 1057 break;
1058 } 1058 }
1059 } 1059 }
1060 1060
1061 1061
1062 void JSObject::SpillInformation::Clear() { 1062 void JSObject::SpillInformation::Clear() {
1063 number_of_objects_ = 0; 1063 number_of_objects_ = 0;
1064 number_of_objects_with_fast_properties_ = 0; 1064 number_of_objects_with_fast_properties_ = 0;
1065 number_of_objects_with_fast_elements_ = 0; 1065 number_of_objects_with_fast_elements_ = 0;
1066 number_of_fast_used_fields_ = 0; 1066 number_of_fast_used_fields_ = 0;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 for (int i = 0; i < number_of_transitions(); ++i) { 1150 for (int i = 0; i < number_of_transitions(); ++i) {
1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1152 } 1152 }
1153 return true; 1153 return true;
1154 } 1154 }
1155 1155
1156 1156
1157 #endif // DEBUG 1157 #endif // DEBUG
1158 1158
1159 } } // namespace v8::internal 1159 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698