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

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

Issue 1273353003: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow check failures. REBASE. 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/runtime/runtime-simd.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/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 Map::cast(this)->MapPrint(os); 53 Map::cast(this)->MapPrint(os);
54 break; 54 break;
55 case HEAP_NUMBER_TYPE: 55 case HEAP_NUMBER_TYPE:
56 HeapNumber::cast(this)->HeapNumberPrint(os); 56 HeapNumber::cast(this)->HeapNumberPrint(os);
57 break; 57 break;
58 case MUTABLE_HEAP_NUMBER_TYPE: 58 case MUTABLE_HEAP_NUMBER_TYPE:
59 os << "<mutable "; 59 os << "<mutable ";
60 HeapNumber::cast(this)->HeapNumberPrint(os); 60 HeapNumber::cast(this)->HeapNumberPrint(os);
61 os << ">"; 61 os << ">";
62 break; 62 break;
63 case FLOAT32X4_TYPE: 63 case SIMD128_VALUE_TYPE:
64 Float32x4::cast(this)->Float32x4Print(os); 64 Simd128Value::cast(this)->Simd128ValuePrint(os);
65 break;
66 case INT32X4_TYPE:
67 Int32x4::cast(this)->Int32x4Print(os);
68 break;
69 case BOOL32X4_TYPE:
70 Bool32x4::cast(this)->Bool32x4Print(os);
71 break;
72 case INT16X8_TYPE:
73 Int16x8::cast(this)->Int16x8Print(os);
74 break;
75 case BOOL16X8_TYPE:
76 Bool16x8::cast(this)->Bool16x8Print(os);
77 break;
78 case INT8X16_TYPE:
79 Int16x8::cast(this)->Int16x8Print(os);
80 break;
81 case BOOL8X16_TYPE:
82 Bool16x8::cast(this)->Bool16x8Print(os);
83 break; 65 break;
84 case FIXED_DOUBLE_ARRAY_TYPE: 66 case FIXED_DOUBLE_ARRAY_TYPE:
85 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(os); 67 FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(os);
86 break; 68 break;
87 case FIXED_ARRAY_TYPE: 69 case FIXED_ARRAY_TYPE:
88 FixedArray::cast(this)->FixedArrayPrint(os); 70 FixedArray::cast(this)->FixedArrayPrint(os);
89 break; 71 break;
90 case BYTE_ARRAY_TYPE: 72 case BYTE_ARRAY_TYPE:
91 ByteArray::cast(this)->ByteArrayPrint(os); 73 ByteArray::cast(this)->ByteArrayPrint(os);
92 break; 74 break;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 #undef MAKE_STRUCT_CASE 184 #undef MAKE_STRUCT_CASE
203 185
204 default: 186 default:
205 os << "UNKNOWN TYPE " << map()->instance_type(); 187 os << "UNKNOWN TYPE " << map()->instance_type();
206 UNREACHABLE(); 188 UNREACHABLE();
207 break; 189 break;
208 } 190 }
209 } 191 }
210 192
211 193
194 void Simd128Value::Simd128ValuePrint(std::ostream& os) { // NOLINT
195 #define PRINT_SIMD128_VALUE(TYPE, Type, type, lane_count, lane_type) \
196 if (Is##Type()) return Type::cast(this)->Type##Print(os);
197 SIMD128_TYPES(PRINT_SIMD128_VALUE)
198 #undef PRINT_SIMD128_VALUE
199 UNREACHABLE();
200 }
201
202
212 void Float32x4::Float32x4Print(std::ostream& os) { // NOLINT 203 void Float32x4::Float32x4Print(std::ostream& os) { // NOLINT
213 char arr[100]; 204 char arr[100];
214 Vector<char> buffer(arr, arraysize(arr)); 205 Vector<char> buffer(arr, arraysize(arr));
215 os << std::string(DoubleToCString(get_lane(0), buffer)) << ", " 206 os << std::string(DoubleToCString(get_lane(0), buffer)) << ", "
216 << std::string(DoubleToCString(get_lane(1), buffer)) << ", " 207 << std::string(DoubleToCString(get_lane(1), buffer)) << ", "
217 << std::string(DoubleToCString(get_lane(2), buffer)) << ", " 208 << std::string(DoubleToCString(get_lane(2), buffer)) << ", "
218 << std::string(DoubleToCString(get_lane(3), buffer)); 209 << std::string(DoubleToCString(get_lane(3), buffer));
219 } 210 }
220 211
221 212
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 } 1281 }
1291 } 1282 }
1292 1283
1293 1284
1294 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1285 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1295 TransitionArray::PrintTransitions(os, map()->raw_transitions()); 1286 TransitionArray::PrintTransitions(os, map()->raw_transitions());
1296 } 1287 }
1297 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1288 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1298 } // namespace internal 1289 } // namespace internal
1299 } // namespace v8 1290 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime-simd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698