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

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

Issue 90643003: Experimental implementation: Exposing SIMD instructions into JavaScript Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 switch (instance_type) { 82 switch (instance_type) {
83 case SYMBOL_TYPE: 83 case SYMBOL_TYPE:
84 Symbol::cast(this)->SymbolVerify(); 84 Symbol::cast(this)->SymbolVerify();
85 break; 85 break;
86 case MAP_TYPE: 86 case MAP_TYPE:
87 Map::cast(this)->MapVerify(); 87 Map::cast(this)->MapVerify();
88 break; 88 break;
89 case HEAP_NUMBER_TYPE: 89 case HEAP_NUMBER_TYPE:
90 HeapNumber::cast(this)->HeapNumberVerify(); 90 HeapNumber::cast(this)->HeapNumberVerify();
91 break; 91 break;
92 case FLOAT32x4_TYPE:
93 Float32x4::cast(this)->Float32x4Verify();
94 break;
95 case INT32x4_TYPE:
96 Int32x4::cast(this)->Int32x4Verify();
97 break;
92 case FIXED_ARRAY_TYPE: 98 case FIXED_ARRAY_TYPE:
93 FixedArray::cast(this)->FixedArrayVerify(); 99 FixedArray::cast(this)->FixedArrayVerify();
94 break; 100 break;
95 case FIXED_DOUBLE_ARRAY_TYPE: 101 case FIXED_DOUBLE_ARRAY_TYPE:
96 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify(); 102 FixedDoubleArray::cast(this)->FixedDoubleArrayVerify();
97 break; 103 break;
98 case CONSTANT_POOL_ARRAY_TYPE: 104 case CONSTANT_POOL_ARRAY_TYPE:
99 ConstantPoolArray::cast(this)->ConstantPoolArrayVerify(); 105 ConstantPoolArray::cast(this)->ConstantPoolArrayVerify();
100 break; 106 break;
101 case BYTE_ARRAY_TYPE: 107 case BYTE_ARRAY_TYPE:
(...skipping 20 matching lines...) Expand all
122 break; 128 break;
123 case EXTERNAL_INT_ARRAY_TYPE: 129 case EXTERNAL_INT_ARRAY_TYPE:
124 ExternalIntArray::cast(this)->ExternalIntArrayVerify(); 130 ExternalIntArray::cast(this)->ExternalIntArrayVerify();
125 break; 131 break;
126 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: 132 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
127 ExternalUnsignedIntArray::cast(this)->ExternalUnsignedIntArrayVerify(); 133 ExternalUnsignedIntArray::cast(this)->ExternalUnsignedIntArrayVerify();
128 break; 134 break;
129 case EXTERNAL_FLOAT_ARRAY_TYPE: 135 case EXTERNAL_FLOAT_ARRAY_TYPE:
130 ExternalFloatArray::cast(this)->ExternalFloatArrayVerify(); 136 ExternalFloatArray::cast(this)->ExternalFloatArrayVerify();
131 break; 137 break;
138 case EXTERNAL_FLOAT32x4_ARRAY_TYPE:
139 ExternalFloat32x4Array::cast(this)->ExternalFloat32x4ArrayVerify();
140 break;
141 case EXTERNAL_INT32x4_ARRAY_TYPE:
142 ExternalInt32x4Array::cast(this)->ExternalInt32x4ArrayVerify();
143 break;
132 case EXTERNAL_DOUBLE_ARRAY_TYPE: 144 case EXTERNAL_DOUBLE_ARRAY_TYPE:
133 ExternalDoubleArray::cast(this)->ExternalDoubleArrayVerify(); 145 ExternalDoubleArray::cast(this)->ExternalDoubleArrayVerify();
134 break; 146 break;
135 case CODE_TYPE: 147 case CODE_TYPE:
136 Code::cast(this)->CodeVerify(); 148 Code::cast(this)->CodeVerify();
137 break; 149 break;
138 case ODDBALL_TYPE: 150 case ODDBALL_TYPE:
139 Oddball::cast(this)->OddballVerify(); 151 Oddball::cast(this)->OddballVerify();
140 break; 152 break;
141 case JS_OBJECT_TYPE: 153 case JS_OBJECT_TYPE:
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 CHECK(name()->IsUndefined() || name()->IsString()); 257 CHECK(name()->IsUndefined() || name()->IsString());
246 CHECK(flags()->IsSmi()); 258 CHECK(flags()->IsSmi());
247 } 259 }
248 260
249 261
250 void HeapNumber::HeapNumberVerify() { 262 void HeapNumber::HeapNumberVerify() {
251 CHECK(IsHeapNumber()); 263 CHECK(IsHeapNumber());
252 } 264 }
253 265
254 266
267 void Float32x4::Float32x4Verify() {
268 CHECK(IsFloat32x4());
269 }
270
271
272 void Int32x4::Int32x4Verify() {
273 CHECK(IsInt32x4());
274 }
275
276
255 void ByteArray::ByteArrayVerify() { 277 void ByteArray::ByteArrayVerify() {
256 CHECK(IsByteArray()); 278 CHECK(IsByteArray());
257 } 279 }
258 280
259 281
260 void FreeSpace::FreeSpaceVerify() { 282 void FreeSpace::FreeSpaceVerify() {
261 CHECK(IsFreeSpace()); 283 CHECK(IsFreeSpace());
262 } 284 }
263 285
264 286
(...skipping 30 matching lines...) Expand all
295 void ExternalUnsignedIntArray::ExternalUnsignedIntArrayVerify() { 317 void ExternalUnsignedIntArray::ExternalUnsignedIntArrayVerify() {
296 CHECK(IsExternalUnsignedIntArray()); 318 CHECK(IsExternalUnsignedIntArray());
297 } 319 }
298 320
299 321
300 void ExternalFloatArray::ExternalFloatArrayVerify() { 322 void ExternalFloatArray::ExternalFloatArrayVerify() {
301 CHECK(IsExternalFloatArray()); 323 CHECK(IsExternalFloatArray());
302 } 324 }
303 325
304 326
327 void ExternalFloat32x4Array::ExternalFloat32x4ArrayVerify() {
328 CHECK(IsExternalFloat32x4Array());
329 }
330
331
332 void ExternalInt32x4Array::ExternalInt32x4ArrayVerify() {
333 CHECK(IsExternalInt32x4Array());
334 }
335
336
305 void ExternalDoubleArray::ExternalDoubleArrayVerify() { 337 void ExternalDoubleArray::ExternalDoubleArrayVerify() {
306 CHECK(IsExternalDoubleArray()); 338 CHECK(IsExternalDoubleArray());
307 } 339 }
308 340
309 341
310 bool JSObject::ElementsAreSafeToExamine() { 342 bool JSObject::ElementsAreSafeToExamine() {
311 return (FLAG_use_gvn && FLAG_use_allocation_folding) || 343 return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
312 reinterpret_cast<Map*>(elements()) != 344 reinterpret_cast<Map*>(elements()) !=
313 GetHeap()->one_pointer_filler_map(); 345 GetHeap()->one_pointer_filler_map();
314 } 346 }
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 info->number_of_fast_unused_elements_ += holes; 1111 info->number_of_fast_unused_elements_ += holes;
1080 break; 1112 break;
1081 } 1113 }
1082 case EXTERNAL_BYTE_ELEMENTS: 1114 case EXTERNAL_BYTE_ELEMENTS:
1083 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 1115 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
1084 case EXTERNAL_SHORT_ELEMENTS: 1116 case EXTERNAL_SHORT_ELEMENTS:
1085 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: 1117 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
1086 case EXTERNAL_INT_ELEMENTS: 1118 case EXTERNAL_INT_ELEMENTS:
1087 case EXTERNAL_UNSIGNED_INT_ELEMENTS: 1119 case EXTERNAL_UNSIGNED_INT_ELEMENTS:
1088 case EXTERNAL_FLOAT_ELEMENTS: 1120 case EXTERNAL_FLOAT_ELEMENTS:
1121 case EXTERNAL_FLOAT32x4_ELEMENTS:
1122 case EXTERNAL_INT32x4_ELEMENTS:
1089 case EXTERNAL_DOUBLE_ELEMENTS: 1123 case EXTERNAL_DOUBLE_ELEMENTS:
1090 case EXTERNAL_PIXEL_ELEMENTS: { 1124 case EXTERNAL_PIXEL_ELEMENTS: {
1091 info->number_of_objects_with_fast_elements_++; 1125 info->number_of_objects_with_fast_elements_++;
1092 ExternalPixelArray* e = ExternalPixelArray::cast(elements()); 1126 ExternalPixelArray* e = ExternalPixelArray::cast(elements());
1093 info->number_of_fast_used_elements_ += e->length(); 1127 info->number_of_fast_used_elements_ += e->length();
1094 break; 1128 break;
1095 } 1129 }
1096 case DICTIONARY_ELEMENTS: { 1130 case DICTIONARY_ELEMENTS: {
1097 SeededNumberDictionary* dict = element_dictionary(); 1131 SeededNumberDictionary* dict = element_dictionary();
1098 info->number_of_slow_used_elements_ += dict->NumberOfElements(); 1132 info->number_of_slow_used_elements_ += dict->NumberOfElements();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 for (int i = 0; i < number_of_transitions(); ++i) { 1231 for (int i = 0; i < number_of_transitions(); ++i) {
1198 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1232 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1199 } 1233 }
1200 return true; 1234 return true;
1201 } 1235 }
1202 1236
1203 1237
1204 #endif // DEBUG 1238 #endif // DEBUG
1205 1239
1206 } } // namespace v8::internal 1240 } } // 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