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

Side by Side Diff: include/v8.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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 class AccessorSignature; 68 class AccessorSignature;
69 class Array; 69 class Array;
70 class Boolean; 70 class Boolean;
71 class BooleanObject; 71 class BooleanObject;
72 class Context; 72 class Context;
73 class CpuProfiler; 73 class CpuProfiler;
74 class Data; 74 class Data;
75 class Date; 75 class Date;
76 class External; 76 class External;
77 class Float32x4Object;
77 class Function; 78 class Function;
78 class FunctionTemplate; 79 class FunctionTemplate;
79 class HeapProfiler; 80 class HeapProfiler;
80 class ImplementationUtilities; 81 class ImplementationUtilities;
81 class Int32; 82 class Int32;
82 class Integer; 83 class Integer;
83 class Isolate; 84 class Isolate;
84 template <class T> 85 template <class T>
85 class Maybe; 86 class Maybe;
86 class Name; 87 class Name;
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 */ 1791 */
1791 bool IsStringObject() const; 1792 bool IsStringObject() const;
1792 1793
1793 /** 1794 /**
1794 * Returns true if this value is a Symbol object. 1795 * Returns true if this value is a Symbol object.
1795 * This is an experimental feature. 1796 * This is an experimental feature.
1796 */ 1797 */
1797 bool IsSymbolObject() const; 1798 bool IsSymbolObject() const;
1798 1799
1799 /** 1800 /**
1801 * Returns true if this value is a Float32x4 object.
1802 * This is an experimental feature.
1803 */
1804 bool IsFloat32x4Object() const;
1805
1806 /**
1800 * Returns true if this value is a NativeError. 1807 * Returns true if this value is a NativeError.
1801 */ 1808 */
1802 bool IsNativeError() const; 1809 bool IsNativeError() const;
1803 1810
1804 /** 1811 /**
1805 * Returns true if this value is a RegExp. 1812 * Returns true if this value is a RegExp.
1806 */ 1813 */
1807 bool IsRegExp() const; 1814 bool IsRegExp() const;
1808 1815
1809 /** 1816 /**
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after
3834 3841
3835 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; 3842 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT;
3836 3843
3837 private: 3844 private:
3838 SharedArrayBuffer(); 3845 SharedArrayBuffer();
3839 static void CheckCast(Value* obj); 3846 static void CheckCast(Value* obj);
3840 }; 3847 };
3841 3848
3842 3849
3843 /** 3850 /**
3851 * An instance of Float32x4 constructor.
3852 * (ES7 draft http://littledan.github.io/simd.html).
3853 * This API is experimental and may change significantly.
3854 */
3855 class V8_EXPORT Float32x4 : public Value {
3856 public:
3857 static Local<Float32x4> New(Isolate* isolate, float w, float x, float y,
3858 float z);
3859 V8_INLINE static Float32x4* Cast(Value* obj);
3860
3861 private:
3862 Float32x4();
3863 static void CheckCast(Value* obj);
3864 };
3865
3866
3867 /**
3844 * An instance of the built-in Date constructor (ECMA-262, 15.9). 3868 * An instance of the built-in Date constructor (ECMA-262, 15.9).
3845 */ 3869 */
3846 class V8_EXPORT Date : public Object { 3870 class V8_EXPORT Date : public Object {
3847 public: 3871 public:
3848 static V8_DEPRECATE_SOON("Use maybe version.", 3872 static V8_DEPRECATE_SOON("Use maybe version.",
3849 Local<Value> New(Isolate* isolate, double time)); 3873 Local<Value> New(Isolate* isolate, double time));
3850 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, 3874 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context,
3851 double time); 3875 double time);
3852 3876
3853 /** 3877 /**
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
3937 Local<Symbol> ValueOf() const; 3961 Local<Symbol> ValueOf() const;
3938 3962
3939 V8_INLINE static SymbolObject* Cast(v8::Value* obj); 3963 V8_INLINE static SymbolObject* Cast(v8::Value* obj);
3940 3964
3941 private: 3965 private:
3942 static void CheckCast(v8::Value* obj); 3966 static void CheckCast(v8::Value* obj);
3943 }; 3967 };
3944 3968
3945 3969
3946 /** 3970 /**
3971 * A Float32x4 object.
3972 * (ES7 draft http://littledan.github.io/simd.html).
3973 * This is an experimental feature. Use at your own risk.
3974 */
3975 class V8_EXPORT Float32x4Object : public Object {
3976 public:
3977 static Local<Value> New(Isolate* isolate, Local<Float32x4> value);
3978
3979 Local<Float32x4> ValueOf() const;
3980
3981 V8_INLINE static Float32x4Object* Cast(v8::Value* obj);
3982
3983 private:
3984 static void CheckCast(v8::Value* obj);
3985 };
3986
3987
3988 /**
3947 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). 3989 * An instance of the built-in RegExp constructor (ECMA-262, 15.10).
3948 */ 3990 */
3949 class V8_EXPORT RegExp : public Object { 3991 class V8_EXPORT RegExp : public Object {
3950 public: 3992 public:
3951 /** 3993 /**
3952 * Regular expression flag bits. They can be or'ed to enable a set 3994 * Regular expression flag bits. They can be or'ed to enable a set
3953 * of flags. 3995 * of flags.
3954 */ 3996 */
3955 enum Flags { 3997 enum Flags {
3956 kNone = 0, 3998 kNone = 0,
(...skipping 2975 matching lines...) Expand 10 before | Expand all | Expand 10 after
6932 static const int kHeapObjectMapOffset = 0; 6974 static const int kHeapObjectMapOffset = 0;
6933 static const int kMapInstanceTypeAndBitFieldOffset = 6975 static const int kMapInstanceTypeAndBitFieldOffset =
6934 1 * kApiPointerSize + kApiIntSize; 6976 1 * kApiPointerSize + kApiIntSize;
6935 static const int kStringResourceOffset = 3 * kApiPointerSize; 6977 static const int kStringResourceOffset = 3 * kApiPointerSize;
6936 6978
6937 static const int kOddballKindOffset = 3 * kApiPointerSize; 6979 static const int kOddballKindOffset = 3 * kApiPointerSize;
6938 static const int kForeignAddressOffset = kApiPointerSize; 6980 static const int kForeignAddressOffset = kApiPointerSize;
6939 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; 6981 static const int kJSObjectHeaderSize = 3 * kApiPointerSize;
6940 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; 6982 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize;
6941 static const int kContextHeaderSize = 2 * kApiPointerSize; 6983 static const int kContextHeaderSize = 2 * kApiPointerSize;
6942 static const int kContextEmbedderDataIndex = 81; 6984 static const int kContextEmbedderDataIndex = 83;
6943 static const int kFullStringRepresentationMask = 0x07; 6985 static const int kFullStringRepresentationMask = 0x07;
6944 static const int kStringEncodingMask = 0x4; 6986 static const int kStringEncodingMask = 0x4;
6945 static const int kExternalTwoByteRepresentationTag = 0x02; 6987 static const int kExternalTwoByteRepresentationTag = 0x02;
6946 static const int kExternalOneByteRepresentationTag = 0x06; 6988 static const int kExternalOneByteRepresentationTag = 0x06;
6947 6989
6948 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; 6990 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize;
6949 static const int kAmountOfExternalAllocatedMemoryOffset = 6991 static const int kAmountOfExternalAllocatedMemoryOffset =
6950 4 * kApiPointerSize; 6992 4 * kApiPointerSize;
6951 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = 6993 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset =
6952 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; 6994 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size;
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
7849 7891
7850 7892
7851 SymbolObject* SymbolObject::Cast(v8::Value* value) { 7893 SymbolObject* SymbolObject::Cast(v8::Value* value) {
7852 #ifdef V8_ENABLE_CHECKS 7894 #ifdef V8_ENABLE_CHECKS
7853 CheckCast(value); 7895 CheckCast(value);
7854 #endif 7896 #endif
7855 return static_cast<SymbolObject*>(value); 7897 return static_cast<SymbolObject*>(value);
7856 } 7898 }
7857 7899
7858 7900
7901 Float32x4Object* Float32x4Object::Cast(v8::Value* value) {
7902 #ifdef V8_ENABLE_CHECKS
7903 CheckCast(value);
7904 #endif
7905 return static_cast<Float32x4Object*>(value);
7906 }
7907
7908
7859 NumberObject* NumberObject::Cast(v8::Value* value) { 7909 NumberObject* NumberObject::Cast(v8::Value* value) {
7860 #ifdef V8_ENABLE_CHECKS 7910 #ifdef V8_ENABLE_CHECKS
7861 CheckCast(value); 7911 CheckCast(value);
7862 #endif 7912 #endif
7863 return static_cast<NumberObject*>(value); 7913 return static_cast<NumberObject*>(value);
7864 } 7914 }
7865 7915
7866 7916
7867 BooleanObject* BooleanObject::Cast(v8::Value* value) { 7917 BooleanObject* BooleanObject::Cast(v8::Value* value) {
7868 #ifdef V8_ENABLE_CHECKS 7918 #ifdef V8_ENABLE_CHECKS
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
8338 */ 8388 */
8339 8389
8340 8390
8341 } // namespace v8 8391 } // namespace v8
8342 8392
8343 8393
8344 #undef TYPE_CHECK 8394 #undef TYPE_CHECK
8345 8395
8346 8396
8347 #endif // V8_H_ 8397 #endif // V8_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/arm/code-stubs-arm.cc » ('j') | src/arm64/full-codegen-arm64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698