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