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

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

Issue 1257223002: Revert of Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/lithium-codegen-ppc.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 case BYTE_ARRAY_TYPE: 73 case BYTE_ARRAY_TYPE:
74 ByteArray::cast(this)->ByteArrayPrint(os); 74 ByteArray::cast(this)->ByteArrayPrint(os);
75 break; 75 break;
76 case BYTECODE_ARRAY_TYPE: 76 case BYTECODE_ARRAY_TYPE:
77 BytecodeArray::cast(this)->BytecodeArrayPrint(os); 77 BytecodeArray::cast(this)->BytecodeArrayPrint(os);
78 break; 78 break;
79 case FREE_SPACE_TYPE: 79 case FREE_SPACE_TYPE:
80 FreeSpace::cast(this)->FreeSpacePrint(os); 80 FreeSpace::cast(this)->FreeSpacePrint(os);
81 break; 81 break;
82 82
83 #define PRINT_EXTERNAL_ARRAY(Type, type, TYPE, ctype, size) \
84 case EXTERNAL_##TYPE##_ARRAY_TYPE: \
85 External##Type##Array::cast(this)->External##Type##ArrayPrint(os); \
86 break;
87
88 TYPED_ARRAYS(PRINT_EXTERNAL_ARRAY)
89 #undef PRINT_EXTERNAL_ARRAY
90
83 #define PRINT_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ 91 #define PRINT_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
84 case Fixed##Type##Array::kInstanceType: \ 92 case Fixed##Type##Array::kInstanceType: \
85 Fixed##Type##Array::cast(this)->FixedTypedArrayPrint(os); \ 93 Fixed##Type##Array::cast(this)->FixedTypedArrayPrint(os); \
86 break; 94 break;
87 95
88 TYPED_ARRAYS(PRINT_FIXED_TYPED_ARRAY) 96 TYPED_ARRAYS(PRINT_FIXED_TYPED_ARRAY)
89 #undef PRINT_FIXED_TYPED_ARRAY 97 #undef PRINT_FIXED_TYPED_ARRAY
90 98
91 case FILLER_TYPE: 99 case FILLER_TYPE:
92 os << "filler"; 100 os << "filler";
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void BytecodeArray::BytecodeArrayPrint(std::ostream& os) { // NOLINT 208 void BytecodeArray::BytecodeArrayPrint(std::ostream& os) { // NOLINT
201 Disassemble(os); 209 Disassemble(os);
202 } 210 }
203 211
204 212
205 void FreeSpace::FreeSpacePrint(std::ostream& os) { // NOLINT 213 void FreeSpace::FreeSpacePrint(std::ostream& os) { // NOLINT
206 os << "free space, size " << Size(); 214 os << "free space, size " << Size();
207 } 215 }
208 216
209 217
218 #define EXTERNAL_ARRAY_PRINTER(Type, type, TYPE, ctype, size) \
219 void External##Type##Array::External##Type##ArrayPrint(std::ostream& os) { \
220 os << "external " #type " array"; \
221 }
222
223 TYPED_ARRAYS(EXTERNAL_ARRAY_PRINTER)
224
225 #undef EXTERNAL_ARRAY_PRINTER
226
227
210 template <class Traits> 228 template <class Traits>
211 void FixedTypedArray<Traits>::FixedTypedArrayPrint( 229 void FixedTypedArray<Traits>::FixedTypedArrayPrint(
212 std::ostream& os) { // NOLINT 230 std::ostream& os) { // NOLINT
213 os << "fixed " << Traits::Designator(); 231 os << "fixed " << Traits::Designator();
214 } 232 }
215 233
216 234
217 void JSObject::PrintProperties(std::ostream& os) { // NOLINT 235 void JSObject::PrintProperties(std::ostream& os) { // NOLINT
218 if (HasFastProperties()) { 236 if (HasFastProperties()) {
219 DescriptorArray* descs = map()->instance_descriptors(); 237 DescriptorArray* descs = map()->instance_descriptors();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 break; 314 break;
297 } 315 }
298 316
299 317
300 #define PRINT_ELEMENTS(Kind, Type) \ 318 #define PRINT_ELEMENTS(Kind, Type) \
301 case Kind: { \ 319 case Kind: { \
302 DoPrintElements<Type>(os, elements()); \ 320 DoPrintElements<Type>(os, elements()); \
303 break; \ 321 break; \
304 } 322 }
305 323
324 PRINT_ELEMENTS(EXTERNAL_UINT8_CLAMPED_ELEMENTS, ExternalUint8ClampedArray)
325 PRINT_ELEMENTS(EXTERNAL_INT8_ELEMENTS, ExternalInt8Array)
326 PRINT_ELEMENTS(EXTERNAL_UINT8_ELEMENTS,
327 ExternalUint8Array)
328 PRINT_ELEMENTS(EXTERNAL_INT16_ELEMENTS, ExternalInt16Array)
329 PRINT_ELEMENTS(EXTERNAL_UINT16_ELEMENTS,
330 ExternalUint16Array)
331 PRINT_ELEMENTS(EXTERNAL_INT32_ELEMENTS, ExternalInt32Array)
332 PRINT_ELEMENTS(EXTERNAL_UINT32_ELEMENTS,
333 ExternalUint32Array)
334 PRINT_ELEMENTS(EXTERNAL_FLOAT32_ELEMENTS, ExternalFloat32Array)
335 PRINT_ELEMENTS(EXTERNAL_FLOAT64_ELEMENTS, ExternalFloat64Array)
336
306 PRINT_ELEMENTS(UINT8_ELEMENTS, FixedUint8Array) 337 PRINT_ELEMENTS(UINT8_ELEMENTS, FixedUint8Array)
307 PRINT_ELEMENTS(UINT8_CLAMPED_ELEMENTS, FixedUint8ClampedArray) 338 PRINT_ELEMENTS(UINT8_CLAMPED_ELEMENTS, FixedUint8ClampedArray)
308 PRINT_ELEMENTS(INT8_ELEMENTS, FixedInt8Array) 339 PRINT_ELEMENTS(INT8_ELEMENTS, FixedInt8Array)
309 PRINT_ELEMENTS(UINT16_ELEMENTS, FixedUint16Array) 340 PRINT_ELEMENTS(UINT16_ELEMENTS, FixedUint16Array)
310 PRINT_ELEMENTS(INT16_ELEMENTS, FixedInt16Array) 341 PRINT_ELEMENTS(INT16_ELEMENTS, FixedInt16Array)
311 PRINT_ELEMENTS(UINT32_ELEMENTS, FixedUint32Array) 342 PRINT_ELEMENTS(UINT32_ELEMENTS, FixedUint32Array)
312 PRINT_ELEMENTS(INT32_ELEMENTS, FixedInt32Array) 343 PRINT_ELEMENTS(INT32_ELEMENTS, FixedInt32Array)
313 PRINT_ELEMENTS(FLOAT32_ELEMENTS, FixedFloat32Array) 344 PRINT_ELEMENTS(FLOAT32_ELEMENTS, FixedFloat32Array)
314 PRINT_ELEMENTS(FLOAT64_ELEMENTS, FixedFloat64Array) 345 PRINT_ELEMENTS(FLOAT64_ELEMENTS, FixedFloat64Array)
315 346
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 } 1235 }
1205 } 1236 }
1206 1237
1207 1238
1208 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1239 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1209 TransitionArray::PrintTransitions(os, map()->raw_transitions()); 1240 TransitionArray::PrintTransitions(os, map()->raw_transitions());
1210 } 1241 }
1211 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1242 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1212 } // namespace internal 1243 } // namespace internal
1213 } // namespace v8 1244 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/lithium-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698