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

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

Issue 132233012: Revert "Implement in-heap backing store for typed arrays." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 break; 125 break;
126 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: 126 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
127 ExternalUnsignedIntArray::cast(this)->ExternalUnsignedIntArrayVerify(); 127 ExternalUnsignedIntArray::cast(this)->ExternalUnsignedIntArrayVerify();
128 break; 128 break;
129 case EXTERNAL_FLOAT_ARRAY_TYPE: 129 case EXTERNAL_FLOAT_ARRAY_TYPE:
130 ExternalFloatArray::cast(this)->ExternalFloatArrayVerify(); 130 ExternalFloatArray::cast(this)->ExternalFloatArrayVerify();
131 break; 131 break;
132 case EXTERNAL_DOUBLE_ARRAY_TYPE: 132 case EXTERNAL_DOUBLE_ARRAY_TYPE:
133 ExternalDoubleArray::cast(this)->ExternalDoubleArrayVerify(); 133 ExternalDoubleArray::cast(this)->ExternalDoubleArrayVerify();
134 break; 134 break;
135 case FIXED_UINT8_ARRAY_TYPE:
136 FixedUint8Array::cast(this)->FixedTypedArrayVerify();
137 break;
138 case FIXED_INT8_ARRAY_TYPE:
139 FixedInt8Array::cast(this)->FixedTypedArrayVerify();
140 break;
141 case FIXED_UINT16_ARRAY_TYPE:
142 FixedUint16Array::cast(this)->FixedTypedArrayVerify();
143 break;
144 case FIXED_INT16_ARRAY_TYPE:
145 FixedInt16Array::cast(this)->FixedTypedArrayVerify();
146 break;
147 case FIXED_UINT32_ARRAY_TYPE:
148 FixedUint32Array::cast(this)->FixedTypedArrayVerify();
149 break;
150 case FIXED_INT32_ARRAY_TYPE:
151 FixedInt32Array::cast(this)->FixedTypedArrayVerify();
152 break;
153 case FIXED_FLOAT32_ARRAY_TYPE:
154 FixedFloat32Array::cast(this)->FixedTypedArrayVerify();
155 break;
156 case FIXED_FLOAT64_ARRAY_TYPE:
157 FixedFloat64Array::cast(this)->FixedTypedArrayVerify();
158 break;
159 case FIXED_UINT8_CLAMPED_ARRAY_TYPE:
160 FixedUint8ClampedArray::cast(this)->FixedTypedArrayVerify();
161 break;
162 case CODE_TYPE: 135 case CODE_TYPE:
163 Code::cast(this)->CodeVerify(); 136 Code::cast(this)->CodeVerify();
164 break; 137 break;
165 case ODDBALL_TYPE: 138 case ODDBALL_TYPE:
166 Oddball::cast(this)->OddballVerify(); 139 Oddball::cast(this)->OddballVerify();
167 break; 140 break;
168 case JS_OBJECT_TYPE: 141 case JS_OBJECT_TYPE:
169 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: 142 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
170 JSObject::cast(this)->JSObjectVerify(); 143 JSObject::cast(this)->JSObjectVerify();
171 break; 144 break;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 void ExternalFloatArray::ExternalFloatArrayVerify() { 300 void ExternalFloatArray::ExternalFloatArrayVerify() {
328 CHECK(IsExternalFloatArray()); 301 CHECK(IsExternalFloatArray());
329 } 302 }
330 303
331 304
332 void ExternalDoubleArray::ExternalDoubleArrayVerify() { 305 void ExternalDoubleArray::ExternalDoubleArrayVerify() {
333 CHECK(IsExternalDoubleArray()); 306 CHECK(IsExternalDoubleArray());
334 } 307 }
335 308
336 309
337 template <class Traits>
338 void FixedTypedArray<Traits>::FixedTypedArrayVerify() {
339 CHECK(IsHeapObject() &&
340 HeapObject::cast(this)->map()->instance_type() ==
341 Traits::kInstanceType);
342 }
343
344
345 bool JSObject::ElementsAreSafeToExamine() { 310 bool JSObject::ElementsAreSafeToExamine() {
346 return (FLAG_use_gvn && FLAG_use_allocation_folding) || 311 return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
347 reinterpret_cast<Map*>(elements()) != 312 reinterpret_cast<Map*>(elements()) !=
348 GetHeap()->one_pointer_filler_map(); 313 GetHeap()->one_pointer_filler_map();
349 } 314 }
350 315
351 316
352 void JSObject::JSObjectVerify() { 317 void JSObject::JSObjectVerify() {
353 VerifyHeapPointer(properties()); 318 VerifyHeapPointer(properties());
354 VerifyHeapPointer(elements()); 319 VerifyHeapPointer(elements());
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 break; 1080 break;
1116 } 1081 }
1117 case EXTERNAL_BYTE_ELEMENTS: 1082 case EXTERNAL_BYTE_ELEMENTS:
1118 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 1083 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
1119 case EXTERNAL_SHORT_ELEMENTS: 1084 case EXTERNAL_SHORT_ELEMENTS:
1120 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 1085 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
1121 case EXTERNAL_INT_ELEMENTS: 1086 case EXTERNAL_INT_ELEMENTS:
1122 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 1087 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
1123 case EXTERNAL_FLOAT_ELEMENTS: 1088 case EXTERNAL_FLOAT_ELEMENTS:
1124 case EXTERNAL_DOUBLE_ELEMENTS: 1089 case EXTERNAL_DOUBLE_ELEMENTS:
1125 case EXTERNAL_PIXEL_ELEMENTS: 1090 case EXTERNAL_PIXEL_ELEMENTS: {
1126 case UINT8_ELEMENTS:
1127 case INT8_ELEMENTS:
1128 case UINT16_ELEMENTS:
1129 case INT16_ELEMENTS:
1130 case UINT32_ELEMENTS:
1131 case INT32_ELEMENTS:
1132 case FLOAT32_ELEMENTS:
1133 case FLOAT64_ELEMENTS:
1134 case UINT8_CLAMPED_ELEMENTS: {
1135 info->number_of_objects_with_fast_elements_++; 1091 info->number_of_objects_with_fast_elements_++;
1136 FixedArrayBase* e = FixedArrayBase::cast(elements()); 1092 ExternalPixelArray* e = ExternalPixelArray::cast(elements());
1137 info->number_of_fast_used_elements_ += e->length(); 1093 info->number_of_fast_used_elements_ += e->length();
1138 break; 1094 break;
1139 } 1095 }
1140 case DICTIONARY_ELEMENTS: { 1096 case DICTIONARY_ELEMENTS: {
1141 SeededNumberDictionary* dict = element_dictionary(); 1097 SeededNumberDictionary* dict = element_dictionary();
1142 info->number_of_slow_used_elements_ += dict->NumberOfElements(); 1098 info->number_of_slow_used_elements_ += dict->NumberOfElements();
1143 info->number_of_slow_unused_elements_ += 1099 info->number_of_slow_unused_elements_ +=
1144 dict->Capacity() - dict->NumberOfElements(); 1100 dict->Capacity() - dict->NumberOfElements();
1145 break; 1101 break;
1146 } 1102 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 for (int i = 0; i < number_of_transitions(); ++i) { 1197 for (int i = 0; i < number_of_transitions(); ++i) {
1242 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1198 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1243 } 1199 }
1244 return true; 1200 return true;
1245 } 1201 }
1246 1202
1247 1203
1248 #endif // DEBUG 1204 #endif // DEBUG
1249 1205
1250 } } // namespace v8::internal 1206 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698