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

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

Issue 1262583002: Reland of "Remove ExternalArray, derived types, and element kinds" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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
91 #define PRINT_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ 83 #define PRINT_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
92 case Fixed##Type##Array::kInstanceType: \ 84 case Fixed##Type##Array::kInstanceType: \
93 Fixed##Type##Array::cast(this)->FixedTypedArrayPrint(os); \ 85 Fixed##Type##Array::cast(this)->FixedTypedArrayPrint(os); \
94 break; 86 break;
95 87
96 TYPED_ARRAYS(PRINT_FIXED_TYPED_ARRAY) 88 TYPED_ARRAYS(PRINT_FIXED_TYPED_ARRAY)
97 #undef PRINT_FIXED_TYPED_ARRAY 89 #undef PRINT_FIXED_TYPED_ARRAY
98 90
99 case FILLER_TYPE: 91 case FILLER_TYPE:
100 os << "filler"; 92 os << "filler";
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 void BytecodeArray::BytecodeArrayPrint(std::ostream& os) { // NOLINT 200 void BytecodeArray::BytecodeArrayPrint(std::ostream& os) { // NOLINT
209 Disassemble(os); 201 Disassemble(os);
210 } 202 }
211 203
212 204
213 void FreeSpace::FreeSpacePrint(std::ostream& os) { // NOLINT 205 void FreeSpace::FreeSpacePrint(std::ostream& os) { // NOLINT
214 os << "free space, size " << Size(); 206 os << "free space, size " << Size();
215 } 207 }
216 208
217 209
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
228 template <class Traits> 210 template <class Traits>
229 void FixedTypedArray<Traits>::FixedTypedArrayPrint( 211 void FixedTypedArray<Traits>::FixedTypedArrayPrint(
230 std::ostream& os) { // NOLINT 212 std::ostream& os) { // NOLINT
231 os << "fixed " << Traits::Designator(); 213 os << "fixed " << Traits::Designator();
232 } 214 }
233 215
234 216
235 void JSObject::PrintProperties(std::ostream& os) { // NOLINT 217 void JSObject::PrintProperties(std::ostream& os) { // NOLINT
236 if (HasFastProperties()) { 218 if (HasFastProperties()) {
237 DescriptorArray* descs = map()->instance_descriptors(); 219 DescriptorArray* descs = map()->instance_descriptors();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 break; 296 break;
315 } 297 }
316 298
317 299
318 #define PRINT_ELEMENTS(Kind, Type) \ 300 #define PRINT_ELEMENTS(Kind, Type) \
319 case Kind: { \ 301 case Kind: { \
320 DoPrintElements<Type>(os, elements()); \ 302 DoPrintElements<Type>(os, elements()); \
321 break; \ 303 break; \
322 } 304 }
323 305
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
337 PRINT_ELEMENTS(UINT8_ELEMENTS, FixedUint8Array) 306 PRINT_ELEMENTS(UINT8_ELEMENTS, FixedUint8Array)
338 PRINT_ELEMENTS(UINT8_CLAMPED_ELEMENTS, FixedUint8ClampedArray) 307 PRINT_ELEMENTS(UINT8_CLAMPED_ELEMENTS, FixedUint8ClampedArray)
339 PRINT_ELEMENTS(INT8_ELEMENTS, FixedInt8Array) 308 PRINT_ELEMENTS(INT8_ELEMENTS, FixedInt8Array)
340 PRINT_ELEMENTS(UINT16_ELEMENTS, FixedUint16Array) 309 PRINT_ELEMENTS(UINT16_ELEMENTS, FixedUint16Array)
341 PRINT_ELEMENTS(INT16_ELEMENTS, FixedInt16Array) 310 PRINT_ELEMENTS(INT16_ELEMENTS, FixedInt16Array)
342 PRINT_ELEMENTS(UINT32_ELEMENTS, FixedUint32Array) 311 PRINT_ELEMENTS(UINT32_ELEMENTS, FixedUint32Array)
343 PRINT_ELEMENTS(INT32_ELEMENTS, FixedInt32Array) 312 PRINT_ELEMENTS(INT32_ELEMENTS, FixedInt32Array)
344 PRINT_ELEMENTS(FLOAT32_ELEMENTS, FixedFloat32Array) 313 PRINT_ELEMENTS(FLOAT32_ELEMENTS, FixedFloat32Array)
345 PRINT_ELEMENTS(FLOAT64_ELEMENTS, FixedFloat64Array) 314 PRINT_ELEMENTS(FLOAT64_ELEMENTS, FixedFloat64Array)
346 315
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 } 1204 }
1236 } 1205 }
1237 1206
1238 1207
1239 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1208 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1240 TransitionArray::PrintTransitions(os, map()->raw_transitions()); 1209 TransitionArray::PrintTransitions(os, map()->raw_transitions());
1241 } 1210 }
1242 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1211 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1243 } // namespace internal 1212 } // namespace internal
1244 } // namespace v8 1213 } // 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