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

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

Issue 1219943002: Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't install SIMD object without the simd flag. Created 5 years, 5 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
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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 2218
2219 String* str = String::cast(js_value->value()); 2219 String* str = String::cast(js_value->value());
2220 if (index >= static_cast<uint32_t>(str->length())) return false; 2220 if (index >= static_cast<uint32_t>(str->length())) return false;
2221 2221
2222 return true; 2222 return true;
2223 } 2223 }
2224 2224
2225 2225
2226 void Object::VerifyApiCallResultType() { 2226 void Object::VerifyApiCallResultType() {
2227 #if DEBUG 2227 #if DEBUG
2228 if (!(IsSmi() || 2228 if (!(IsSmi() || IsString() || IsSymbol() || IsSpecObject() ||
2229 IsString() || 2229 IsHeapNumber() || IsFloat32x4() || IsUndefined() || IsTrue() ||
2230 IsSymbol() || 2230 IsFalse() || IsNull())) {
2231 IsSpecObject() ||
2232 IsHeapNumber() ||
2233 IsUndefined() ||
2234 IsTrue() ||
2235 IsFalse() ||
2236 IsNull())) {
2237 FATAL("API call returned invalid object"); 2231 FATAL("API call returned invalid object");
2238 } 2232 }
2239 #endif // DEBUG 2233 #endif // DEBUG
2240 } 2234 }
2241 2235
2242 2236
2243 Object* FixedArray::get(int index) const { 2237 Object* FixedArray::get(int index) const {
2244 SLOW_DCHECK(index >= 0 && index < this->length()); 2238 SLOW_DCHECK(index >= 0 && index < this->length());
2245 return READ_FIELD(this, kHeaderSize + index * kPointerSize); 2239 return READ_FIELD(this, kHeaderSize + index * kPointerSize);
2246 } 2240 }
(...skipping 5068 matching lines...) Expand 10 before | Expand all | Expand 10 after
7315 #undef READ_SHORT_FIELD 7309 #undef READ_SHORT_FIELD
7316 #undef WRITE_SHORT_FIELD 7310 #undef WRITE_SHORT_FIELD
7317 #undef READ_BYTE_FIELD 7311 #undef READ_BYTE_FIELD
7318 #undef WRITE_BYTE_FIELD 7312 #undef WRITE_BYTE_FIELD
7319 #undef NOBARRIER_READ_BYTE_FIELD 7313 #undef NOBARRIER_READ_BYTE_FIELD
7320 #undef NOBARRIER_WRITE_BYTE_FIELD 7314 #undef NOBARRIER_WRITE_BYTE_FIELD
7321 7315
7322 } } // namespace v8::internal 7316 } } // namespace v8::internal
7323 7317
7324 #endif // V8_OBJECTS_INL_H_ 7318 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698