OLD | NEW |
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 Loading... |
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 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 */ | 1786 */ |
1786 bool IsStringObject() const; | 1787 bool IsStringObject() const; |
1787 | 1788 |
1788 /** | 1789 /** |
1789 * Returns true if this value is a Symbol object. | 1790 * Returns true if this value is a Symbol object. |
1790 * This is an experimental feature. | 1791 * This is an experimental feature. |
1791 */ | 1792 */ |
1792 bool IsSymbolObject() const; | 1793 bool IsSymbolObject() const; |
1793 | 1794 |
1794 /** | 1795 /** |
| 1796 * Returns true if this value is a Float32x4 object. |
| 1797 * This is an experimental feature. |
| 1798 */ |
| 1799 bool IsFloat32x4Object() const; |
| 1800 |
| 1801 /** |
1795 * Returns true if this value is a NativeError. | 1802 * Returns true if this value is a NativeError. |
1796 */ | 1803 */ |
1797 bool IsNativeError() const; | 1804 bool IsNativeError() const; |
1798 | 1805 |
1799 /** | 1806 /** |
1800 * Returns true if this value is a RegExp. | 1807 * Returns true if this value is a RegExp. |
1801 */ | 1808 */ |
1802 bool IsRegExp() const; | 1809 bool IsRegExp() const; |
1803 | 1810 |
1804 /** | 1811 /** |
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3836 | 3843 |
3837 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; | 3844 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; |
3838 | 3845 |
3839 private: | 3846 private: |
3840 SharedArrayBuffer(); | 3847 SharedArrayBuffer(); |
3841 static void CheckCast(Value* obj); | 3848 static void CheckCast(Value* obj); |
3842 }; | 3849 }; |
3843 | 3850 |
3844 | 3851 |
3845 /** | 3852 /** |
| 3853 * An instance of Float32x4 constructor. |
| 3854 * (ES7 draft http://littledan.github.io/simd.html). |
| 3855 * This API is experimental and may change significantly. |
| 3856 */ |
| 3857 class V8_EXPORT Float32x4 : public Value { |
| 3858 public: |
| 3859 static Local<Float32x4> New(Isolate* isolate, float w, float x, float y, |
| 3860 float z); |
| 3861 V8_INLINE static Float32x4* Cast(Value* obj); |
| 3862 |
| 3863 private: |
| 3864 Float32x4(); |
| 3865 static void CheckCast(Value* obj); |
| 3866 }; |
| 3867 |
| 3868 |
| 3869 /** |
3846 * An instance of the built-in Date constructor (ECMA-262, 15.9). | 3870 * An instance of the built-in Date constructor (ECMA-262, 15.9). |
3847 */ | 3871 */ |
3848 class V8_EXPORT Date : public Object { | 3872 class V8_EXPORT Date : public Object { |
3849 public: | 3873 public: |
3850 static V8_DEPRECATE_SOON("Use maybe version.", | 3874 static V8_DEPRECATE_SOON("Use maybe version.", |
3851 Local<Value> New(Isolate* isolate, double time)); | 3875 Local<Value> New(Isolate* isolate, double time)); |
3852 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, | 3876 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, |
3853 double time); | 3877 double time); |
3854 | 3878 |
3855 /** | 3879 /** |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3939 Local<Symbol> ValueOf() const; | 3963 Local<Symbol> ValueOf() const; |
3940 | 3964 |
3941 V8_INLINE static SymbolObject* Cast(v8::Value* obj); | 3965 V8_INLINE static SymbolObject* Cast(v8::Value* obj); |
3942 | 3966 |
3943 private: | 3967 private: |
3944 static void CheckCast(v8::Value* obj); | 3968 static void CheckCast(v8::Value* obj); |
3945 }; | 3969 }; |
3946 | 3970 |
3947 | 3971 |
3948 /** | 3972 /** |
| 3973 * A Float32x4 object. |
| 3974 * (ES7 draft http://littledan.github.io/simd.html). |
| 3975 * This is an experimental feature. Use at your own risk. |
| 3976 */ |
| 3977 class V8_EXPORT Float32x4Object : public Object { |
| 3978 public: |
| 3979 static Local<Value> New(Isolate* isolate, Local<Float32x4> value); |
| 3980 |
| 3981 Local<Float32x4> ValueOf() const; |
| 3982 |
| 3983 V8_INLINE static Float32x4Object* Cast(v8::Value* obj); |
| 3984 |
| 3985 private: |
| 3986 static void CheckCast(v8::Value* obj); |
| 3987 }; |
| 3988 |
| 3989 |
| 3990 /** |
3949 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). | 3991 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). |
3950 */ | 3992 */ |
3951 class V8_EXPORT RegExp : public Object { | 3993 class V8_EXPORT RegExp : public Object { |
3952 public: | 3994 public: |
3953 /** | 3995 /** |
3954 * Regular expression flag bits. They can be or'ed to enable a set | 3996 * Regular expression flag bits. They can be or'ed to enable a set |
3955 * of flags. | 3997 * of flags. |
3956 */ | 3998 */ |
3957 enum Flags { | 3999 enum Flags { |
3958 kNone = 0, | 4000 kNone = 0, |
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6951 static const int kHeapObjectMapOffset = 0; | 6993 static const int kHeapObjectMapOffset = 0; |
6952 static const int kMapInstanceTypeAndBitFieldOffset = | 6994 static const int kMapInstanceTypeAndBitFieldOffset = |
6953 1 * kApiPointerSize + kApiIntSize; | 6995 1 * kApiPointerSize + kApiIntSize; |
6954 static const int kStringResourceOffset = 3 * kApiPointerSize; | 6996 static const int kStringResourceOffset = 3 * kApiPointerSize; |
6955 | 6997 |
6956 static const int kOddballKindOffset = 3 * kApiPointerSize; | 6998 static const int kOddballKindOffset = 3 * kApiPointerSize; |
6957 static const int kForeignAddressOffset = kApiPointerSize; | 6999 static const int kForeignAddressOffset = kApiPointerSize; |
6958 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 7000 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
6959 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 7001 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
6960 static const int kContextHeaderSize = 2 * kApiPointerSize; | 7002 static const int kContextHeaderSize = 2 * kApiPointerSize; |
6961 static const int kContextEmbedderDataIndex = 80; | 7003 static const int kContextEmbedderDataIndex = 82; |
6962 static const int kFullStringRepresentationMask = 0x07; | 7004 static const int kFullStringRepresentationMask = 0x07; |
6963 static const int kStringEncodingMask = 0x4; | 7005 static const int kStringEncodingMask = 0x4; |
6964 static const int kExternalTwoByteRepresentationTag = 0x02; | 7006 static const int kExternalTwoByteRepresentationTag = 0x02; |
6965 static const int kExternalOneByteRepresentationTag = 0x06; | 7007 static const int kExternalOneByteRepresentationTag = 0x06; |
6966 | 7008 |
6967 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 7009 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
6968 static const int kAmountOfExternalAllocatedMemoryOffset = | 7010 static const int kAmountOfExternalAllocatedMemoryOffset = |
6969 4 * kApiPointerSize; | 7011 4 * kApiPointerSize; |
6970 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = | 7012 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = |
6971 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; | 7013 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7872 | 7914 |
7873 | 7915 |
7874 SymbolObject* SymbolObject::Cast(v8::Value* value) { | 7916 SymbolObject* SymbolObject::Cast(v8::Value* value) { |
7875 #ifdef V8_ENABLE_CHECKS | 7917 #ifdef V8_ENABLE_CHECKS |
7876 CheckCast(value); | 7918 CheckCast(value); |
7877 #endif | 7919 #endif |
7878 return static_cast<SymbolObject*>(value); | 7920 return static_cast<SymbolObject*>(value); |
7879 } | 7921 } |
7880 | 7922 |
7881 | 7923 |
| 7924 Float32x4Object* Float32x4Object::Cast(v8::Value* value) { |
| 7925 #ifdef V8_ENABLE_CHECKS |
| 7926 CheckCast(value); |
| 7927 #endif |
| 7928 return static_cast<Float32x4Object*>(value); |
| 7929 } |
| 7930 |
| 7931 |
7882 NumberObject* NumberObject::Cast(v8::Value* value) { | 7932 NumberObject* NumberObject::Cast(v8::Value* value) { |
7883 #ifdef V8_ENABLE_CHECKS | 7933 #ifdef V8_ENABLE_CHECKS |
7884 CheckCast(value); | 7934 CheckCast(value); |
7885 #endif | 7935 #endif |
7886 return static_cast<NumberObject*>(value); | 7936 return static_cast<NumberObject*>(value); |
7887 } | 7937 } |
7888 | 7938 |
7889 | 7939 |
7890 BooleanObject* BooleanObject::Cast(v8::Value* value) { | 7940 BooleanObject* BooleanObject::Cast(v8::Value* value) { |
7891 #ifdef V8_ENABLE_CHECKS | 7941 #ifdef V8_ENABLE_CHECKS |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8361 */ | 8411 */ |
8362 | 8412 |
8363 | 8413 |
8364 } // namespace v8 | 8414 } // namespace v8 |
8365 | 8415 |
8366 | 8416 |
8367 #undef TYPE_CHECK | 8417 #undef TYPE_CHECK |
8368 | 8418 |
8369 | 8419 |
8370 #endif // V8_H_ | 8420 #endif // V8_H_ |
OLD | NEW |