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; | |
78 class Function; | 77 class Function; |
79 class FunctionTemplate; | 78 class FunctionTemplate; |
80 class HeapProfiler; | 79 class HeapProfiler; |
81 class ImplementationUtilities; | 80 class ImplementationUtilities; |
82 class Int32; | 81 class Int32; |
83 class Integer; | 82 class Integer; |
84 class Isolate; | 83 class Isolate; |
85 template <class T> | 84 template <class T> |
86 class Maybe; | 85 class Maybe; |
87 class Name; | 86 class Name; |
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 */ | 1794 */ |
1796 bool IsStringObject() const; | 1795 bool IsStringObject() const; |
1797 | 1796 |
1798 /** | 1797 /** |
1799 * Returns true if this value is a Symbol object. | 1798 * Returns true if this value is a Symbol object. |
1800 * This is an experimental feature. | 1799 * This is an experimental feature. |
1801 */ | 1800 */ |
1802 bool IsSymbolObject() const; | 1801 bool IsSymbolObject() const; |
1803 | 1802 |
1804 /** | 1803 /** |
1805 * Returns true if this value is a Float32x4 object. | |
1806 * This is an experimental feature. | |
1807 */ | |
1808 bool IsFloat32x4Object() const; | |
1809 | |
1810 /** | |
1811 * Returns true if this value is a NativeError. | 1804 * Returns true if this value is a NativeError. |
1812 */ | 1805 */ |
1813 bool IsNativeError() const; | 1806 bool IsNativeError() const; |
1814 | 1807 |
1815 /** | 1808 /** |
1816 * Returns true if this value is a RegExp. | 1809 * Returns true if this value is a RegExp. |
1817 */ | 1810 */ |
1818 bool IsRegExp() const; | 1811 bool IsRegExp() const; |
1819 | 1812 |
1820 /** | 1813 /** |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3845 | 3838 |
3846 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; | 3839 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT; |
3847 | 3840 |
3848 private: | 3841 private: |
3849 SharedArrayBuffer(); | 3842 SharedArrayBuffer(); |
3850 static void CheckCast(Value* obj); | 3843 static void CheckCast(Value* obj); |
3851 }; | 3844 }; |
3852 | 3845 |
3853 | 3846 |
3854 /** | 3847 /** |
3855 * An instance of Float32x4 constructor. | |
3856 * (ES7 draft http://littledan.github.io/simd.html). | |
3857 * This API is experimental and may change significantly. | |
3858 */ | |
3859 class V8_EXPORT Float32x4 : public Value { | |
3860 public: | |
3861 static Local<Float32x4> New(Isolate* isolate, float w, float x, float y, | |
3862 float z); | |
3863 V8_INLINE static Float32x4* Cast(Value* obj); | |
3864 | |
3865 private: | |
3866 Float32x4(); | |
3867 static void CheckCast(Value* obj); | |
3868 }; | |
3869 | |
3870 | |
3871 /** | |
3872 * An instance of the built-in Date constructor (ECMA-262, 15.9). | 3848 * An instance of the built-in Date constructor (ECMA-262, 15.9). |
3873 */ | 3849 */ |
3874 class V8_EXPORT Date : public Object { | 3850 class V8_EXPORT Date : public Object { |
3875 public: | 3851 public: |
3876 static V8_DEPRECATE_SOON("Use maybe version.", | 3852 static V8_DEPRECATE_SOON("Use maybe version.", |
3877 Local<Value> New(Isolate* isolate, double time)); | 3853 Local<Value> New(Isolate* isolate, double time)); |
3878 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, | 3854 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, |
3879 double time); | 3855 double time); |
3880 | 3856 |
3881 /** | 3857 /** |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3961 class V8_EXPORT SymbolObject : public Object { | 3937 class V8_EXPORT SymbolObject : public Object { |
3962 public: | 3938 public: |
3963 static Local<Value> New(Isolate* isolate, Local<Symbol> value); | 3939 static Local<Value> New(Isolate* isolate, Local<Symbol> value); |
3964 | 3940 |
3965 Local<Symbol> ValueOf() const; | 3941 Local<Symbol> ValueOf() const; |
3966 | 3942 |
3967 V8_INLINE static SymbolObject* Cast(v8::Value* obj); | 3943 V8_INLINE static SymbolObject* Cast(v8::Value* obj); |
3968 | 3944 |
3969 private: | 3945 private: |
3970 static void CheckCast(v8::Value* obj); | 3946 static void CheckCast(v8::Value* obj); |
3971 }; | |
3972 | |
3973 | |
3974 /** | |
3975 * A Float32x4 object. | |
3976 * (ES7 draft http://littledan.github.io/simd.html). | |
3977 * This is an experimental feature. Use at your own risk. | |
3978 */ | |
3979 class V8_EXPORT Float32x4Object : public Object { | |
3980 public: | |
3981 static Local<Value> New(Isolate* isolate, Local<Float32x4> value); | |
3982 | |
3983 Local<Float32x4> ValueOf() const; | |
3984 | |
3985 V8_INLINE static Float32x4Object* Cast(v8::Value* obj); | |
3986 | |
3987 private: | |
3988 static void CheckCast(v8::Value* obj); | |
3989 }; | 3947 }; |
3990 | 3948 |
3991 | 3949 |
3992 /** | 3950 /** |
3993 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). | 3951 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). |
3994 */ | 3952 */ |
3995 class V8_EXPORT RegExp : public Object { | 3953 class V8_EXPORT RegExp : public Object { |
3996 public: | 3954 public: |
3997 /** | 3955 /** |
3998 * Regular expression flag bits. They can be or'ed to enable a set | 3956 * Regular expression flag bits. They can be or'ed to enable a set |
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6978 static const int kHeapObjectMapOffset = 0; | 6936 static const int kHeapObjectMapOffset = 0; |
6979 static const int kMapInstanceTypeAndBitFieldOffset = | 6937 static const int kMapInstanceTypeAndBitFieldOffset = |
6980 1 * kApiPointerSize + kApiIntSize; | 6938 1 * kApiPointerSize + kApiIntSize; |
6981 static const int kStringResourceOffset = 3 * kApiPointerSize; | 6939 static const int kStringResourceOffset = 3 * kApiPointerSize; |
6982 | 6940 |
6983 static const int kOddballKindOffset = 3 * kApiPointerSize; | 6941 static const int kOddballKindOffset = 3 * kApiPointerSize; |
6984 static const int kForeignAddressOffset = kApiPointerSize; | 6942 static const int kForeignAddressOffset = kApiPointerSize; |
6985 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 6943 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
6986 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 6944 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
6987 static const int kContextHeaderSize = 2 * kApiPointerSize; | 6945 static const int kContextHeaderSize = 2 * kApiPointerSize; |
6988 static const int kContextEmbedderDataIndex = 82; | 6946 static const int kContextEmbedderDataIndex = 81; |
6989 static const int kFullStringRepresentationMask = 0x07; | 6947 static const int kFullStringRepresentationMask = 0x07; |
6990 static const int kStringEncodingMask = 0x4; | 6948 static const int kStringEncodingMask = 0x4; |
6991 static const int kExternalTwoByteRepresentationTag = 0x02; | 6949 static const int kExternalTwoByteRepresentationTag = 0x02; |
6992 static const int kExternalOneByteRepresentationTag = 0x06; | 6950 static const int kExternalOneByteRepresentationTag = 0x06; |
6993 | 6951 |
6994 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 6952 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
6995 static const int kAmountOfExternalAllocatedMemoryOffset = | 6953 static const int kAmountOfExternalAllocatedMemoryOffset = |
6996 4 * kApiPointerSize; | 6954 4 * kApiPointerSize; |
6997 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = | 6955 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = |
6998 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; | 6956 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7895 | 7853 |
7896 | 7854 |
7897 SymbolObject* SymbolObject::Cast(v8::Value* value) { | 7855 SymbolObject* SymbolObject::Cast(v8::Value* value) { |
7898 #ifdef V8_ENABLE_CHECKS | 7856 #ifdef V8_ENABLE_CHECKS |
7899 CheckCast(value); | 7857 CheckCast(value); |
7900 #endif | 7858 #endif |
7901 return static_cast<SymbolObject*>(value); | 7859 return static_cast<SymbolObject*>(value); |
7902 } | 7860 } |
7903 | 7861 |
7904 | 7862 |
7905 Float32x4Object* Float32x4Object::Cast(v8::Value* value) { | |
7906 #ifdef V8_ENABLE_CHECKS | |
7907 CheckCast(value); | |
7908 #endif | |
7909 return static_cast<Float32x4Object*>(value); | |
7910 } | |
7911 | |
7912 | |
7913 NumberObject* NumberObject::Cast(v8::Value* value) { | 7863 NumberObject* NumberObject::Cast(v8::Value* value) { |
7914 #ifdef V8_ENABLE_CHECKS | 7864 #ifdef V8_ENABLE_CHECKS |
7915 CheckCast(value); | 7865 CheckCast(value); |
7916 #endif | 7866 #endif |
7917 return static_cast<NumberObject*>(value); | 7867 return static_cast<NumberObject*>(value); |
7918 } | 7868 } |
7919 | 7869 |
7920 | 7870 |
7921 BooleanObject* BooleanObject::Cast(v8::Value* value) { | 7871 BooleanObject* BooleanObject::Cast(v8::Value* value) { |
7922 #ifdef V8_ENABLE_CHECKS | 7872 #ifdef V8_ENABLE_CHECKS |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8392 */ | 8342 */ |
8393 | 8343 |
8394 | 8344 |
8395 } // namespace v8 | 8345 } // namespace v8 |
8396 | 8346 |
8397 | 8347 |
8398 #undef TYPE_CHECK | 8348 #undef TYPE_CHECK |
8399 | 8349 |
8400 | 8350 |
8401 #endif // V8_H_ | 8351 #endif // V8_H_ |
OLD | NEW |