Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index fafd1681715f4a8e54fef2c44566e4b7f69f7c0c..d038891fc682dcf53b4e3a6e949f502d39bfb29f 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -74,6 +74,7 @@ class CpuProfiler; |
| class Data; |
| class Date; |
| class External; |
| +class Float32x4Object; |
| class Function; |
| class FunctionTemplate; |
| class HeapProfiler; |
| @@ -1792,6 +1793,12 @@ class V8_EXPORT Value : public Data { |
| bool IsSymbolObject() const; |
| /** |
| + * Returns true if this value is a Float32x4 object. |
| + * This is an experimental feature. |
| + */ |
| + bool IsFloat32x4Object() const; |
| + |
| + /** |
| * Returns true if this value is a NativeError. |
| */ |
| bool IsNativeError() const; |
| @@ -3843,6 +3850,23 @@ class V8_EXPORT SharedArrayBuffer : public Object { |
| /** |
| + * An instance of Float32x4 constructor. |
| + * (ES7 draft http://littledan.github.io/simd.html). |
| + * This API is experimental and may change significantly. |
| + */ |
| +class V8_EXPORT Float32x4 : public Value { |
| + public: |
| + static Local<Float32x4> New(Isolate* isolate, float w, float x, float y, |
| + float z); |
| + V8_INLINE static Float32x4* Cast(Value* obj); |
| + |
| + private: |
| + Float32x4(); |
| + static void CheckCast(Value* obj); |
| +}; |
| + |
| + |
| +/** |
| * An instance of the built-in Date constructor (ECMA-262, 15.9). |
| */ |
| class V8_EXPORT Date : public Object { |
| @@ -3946,6 +3970,24 @@ class V8_EXPORT SymbolObject : public Object { |
| /** |
| + * A Float32x4 object (ECMA-262 edition 7). |
|
rossberg
2015/07/02 13:35:43
Nit: point to draft instead
bbudge
2015/07/06 23:59:04
Done.
|
| + * |
| + * This is an experimental feature. Use at your own risk. |
| + */ |
| +class V8_EXPORT Float32x4Object : public Object { |
| + public: |
| + static Local<Value> New(Isolate* isolate, Handle<Float32x4> value); |
| + |
| + Local<Float32x4> ValueOf() const; |
| + |
| + V8_INLINE static Float32x4Object* Cast(v8::Value* obj); |
| + |
| + private: |
| + static void CheckCast(v8::Value* obj); |
| +}; |
| + |
| + |
| +/** |
| * An instance of the built-in RegExp constructor (ECMA-262, 15.10). |
| */ |
| class V8_EXPORT RegExp : public Object { |
| @@ -6958,7 +7000,7 @@ class Internals { |
| static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
| static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
| static const int kContextHeaderSize = 2 * kApiPointerSize; |
| - static const int kContextEmbedderDataIndex = 80; |
| + static const int kContextEmbedderDataIndex = 82; |
| static const int kFullStringRepresentationMask = 0x07; |
| static const int kStringEncodingMask = 0x4; |
| static const int kExternalTwoByteRepresentationTag = 0x02; |
| @@ -7879,6 +7921,14 @@ SymbolObject* SymbolObject::Cast(v8::Value* value) { |
| } |
| +Float32x4Object* Float32x4Object::Cast(v8::Value* value) { |
| +#ifdef V8_ENABLE_CHECKS |
| + CheckCast(value); |
| +#endif |
| + return static_cast<Float32x4Object*>(value); |
| +} |
| + |
| + |
| NumberObject* NumberObject::Cast(v8::Value* value) { |
| #ifdef V8_ENABLE_CHECKS |
| CheckCast(value); |