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

Side by Side Diff: src/objects-inl.h

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-debug.cc ('k') | src/objects-printer.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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 160
161 bool Object::IsHeapObject() const { 161 bool Object::IsHeapObject() const {
162 return Internals::HasHeapObjectTag(this); 162 return Internals::HasHeapObjectTag(this);
163 } 163 }
164 164
165 165
166 TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE) 166 TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE)
167 TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE) 167 TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE)
168 TYPE_CHECKER(Symbol, SYMBOL_TYPE) 168 TYPE_CHECKER(Symbol, SYMBOL_TYPE)
169 TYPE_CHECKER(Simd128Value, SIMD128_VALUE_TYPE)
169 170
170 171
171 bool Object::IsSimd128Value() const { 172 #define SIMD128_TYPE_CHECKER(TYPE, Type, type, lane_count, lane_type) \
172 if (!Object::IsHeapObject()) return false; 173 bool Object::Is##Type() const { \
173 InstanceType instance_type = HeapObject::cast(this)->map()->instance_type(); 174 return Object::IsHeapObject() && \
174 return (instance_type >= FIRST_SIMD_VALUE_TYPE && 175 HeapObject::cast(this)->map() == \
175 instance_type <= LAST_SIMD_VALUE_TYPE); 176 HeapObject::cast(this)->GetHeap()->type##_map(); \
176 } 177 }
177 178 SIMD128_TYPES(SIMD128_TYPE_CHECKER)
178 179 #undef SIMD128_TYPE_CHECKER
179 TYPE_CHECKER(Float32x4, FLOAT32X4_TYPE)
180 TYPE_CHECKER(Int32x4, INT32X4_TYPE)
181 TYPE_CHECKER(Bool32x4, BOOL32X4_TYPE)
182 TYPE_CHECKER(Int16x8, INT16X8_TYPE)
183 TYPE_CHECKER(Bool16x8, BOOL16X8_TYPE)
184 TYPE_CHECKER(Int8x16, INT8X16_TYPE)
185 TYPE_CHECKER(Bool8x16, BOOL8X16_TYPE)
186 180
187 181
188 bool Object::IsString() const { 182 bool Object::IsString() const {
189 return Object::IsHeapObject() 183 return Object::IsHeapObject()
190 && HeapObject::cast(this)->map()->instance_type() < FIRST_NONSTRING_TYPE; 184 && HeapObject::cast(this)->map()->instance_type() < FIRST_NONSTRING_TYPE;
191 } 185 }
192 186
193 187
194 bool Object::IsName() const { 188 bool Object::IsName() const {
195 return IsString() || IsSymbol(); 189 return IsString() || IsSymbol();
(...skipping 7024 matching lines...) Expand 10 before | Expand all | Expand 10 after
7220 #undef READ_INT64_FIELD 7214 #undef READ_INT64_FIELD
7221 #undef WRITE_INT64_FIELD 7215 #undef WRITE_INT64_FIELD
7222 #undef READ_BYTE_FIELD 7216 #undef READ_BYTE_FIELD
7223 #undef WRITE_BYTE_FIELD 7217 #undef WRITE_BYTE_FIELD
7224 #undef NOBARRIER_READ_BYTE_FIELD 7218 #undef NOBARRIER_READ_BYTE_FIELD
7225 #undef NOBARRIER_WRITE_BYTE_FIELD 7219 #undef NOBARRIER_WRITE_BYTE_FIELD
7226 7220
7227 } } // namespace v8::internal 7221 } } // namespace v8::internal
7228 7222
7229 #endif // V8_OBJECTS_INL_H_ 7223 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698