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

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: 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 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 2221
2222 String* str = String::cast(js_value->value()); 2222 String* str = String::cast(js_value->value());
2223 if (index >= static_cast<uint32_t>(str->length())) return false; 2223 if (index >= static_cast<uint32_t>(str->length())) return false;
2224 2224
2225 return true; 2225 return true;
2226 } 2226 }
2227 2227
2228 2228
2229 void Object::VerifyApiCallResultType() { 2229 void Object::VerifyApiCallResultType() {
2230 #if DEBUG 2230 #if DEBUG
2231 if (!(IsSmi() || 2231 if (!(IsSmi() || IsString() || IsSymbol() || IsSpecObject() ||
2232 IsString() || 2232 IsHeapNumber() || IsFloat32x4() || IsUndefined() || IsTrue() ||
2233 IsSymbol() || 2233 IsFalse() || IsNull())) {
2234 IsSpecObject() ||
2235 IsHeapNumber() ||
2236 IsUndefined() ||
2237 IsTrue() ||
2238 IsFalse() ||
2239 IsNull())) {
2240 FATAL("API call returned invalid object"); 2234 FATAL("API call returned invalid object");
2241 } 2235 }
2242 #endif // DEBUG 2236 #endif // DEBUG
2243 } 2237 }
2244 2238
2245 2239
2246 Object* FixedArray::get(int index) const { 2240 Object* FixedArray::get(int index) const {
2247 SLOW_DCHECK(index >= 0 && index < this->length()); 2241 SLOW_DCHECK(index >= 0 && index < this->length());
2248 return READ_FIELD(this, kHeaderSize + index * kPointerSize); 2242 return READ_FIELD(this, kHeaderSize + index * kPointerSize);
2249 } 2243 }
(...skipping 5049 matching lines...) Expand 10 before | Expand all | Expand 10 after
7299 #undef READ_SHORT_FIELD 7293 #undef READ_SHORT_FIELD
7300 #undef WRITE_SHORT_FIELD 7294 #undef WRITE_SHORT_FIELD
7301 #undef READ_BYTE_FIELD 7295 #undef READ_BYTE_FIELD
7302 #undef WRITE_BYTE_FIELD 7296 #undef WRITE_BYTE_FIELD
7303 #undef NOBARRIER_READ_BYTE_FIELD 7297 #undef NOBARRIER_READ_BYTE_FIELD
7304 #undef NOBARRIER_WRITE_BYTE_FIELD 7298 #undef NOBARRIER_WRITE_BYTE_FIELD
7305 7299
7306 } } // namespace v8::internal 7300 } } // namespace v8::internal
7307 7301
7308 #endif // V8_OBJECTS_INL_H_ 7302 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698