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

Side by Side Diff: include/v8.h

Issue 1069883002: WIP SharedArrayBuffer implementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update MakeTypeError calls Created 5 years, 8 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
« no previous file with comments | « no previous file | src/accessors.cc » ('j') | src/accessors.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 * This is an experimental feature. 1886 * This is an experimental feature.
1887 */ 1887 */
1888 bool IsFloat64Array() const; 1888 bool IsFloat64Array() const;
1889 1889
1890 /** 1890 /**
1891 * Returns true if this value is a DataView. 1891 * Returns true if this value is a DataView.
1892 * This is an experimental feature. 1892 * This is an experimental feature.
1893 */ 1893 */
1894 bool IsDataView() const; 1894 bool IsDataView() const;
1895 1895
1896 /**
1897 * Returns true if this value is a SharedArrayBuffer.
1898 * This is an experimental feature.
1899 */
1900 bool IsSharedArrayBuffer() const;
1901
1902 /**
1903 * Returns true if this value is one of SharedTypedArrays.
1904 * This is an experimental feature.
1905 */
1906 bool IsSharedTypedArray() const;
1907
1908 /**
1909 * Returns true if this value is a SharedUint8Array.
1910 * This is an experimental feature.
1911 */
1912 bool IsSharedUint8Array() const;
1913
1914 /**
1915 * Returns true if this value is a SharedUint8ClampedArray.
1916 * This is an experimental feature.
1917 */
1918 bool IsSharedUint8ClampedArray() const;
1919
1920 /**
1921 * Returns true if this value is a SharedInt8Array.
1922 * This is an experimental feature.
1923 */
1924 bool IsSharedInt8Array() const;
1925
1926 /**
1927 * Returns true if this value is a SharedUint16Array.
1928 * This is an experimental feature.
1929 */
1930 bool IsSharedUint16Array() const;
1931
1932 /**
1933 * Returns true if this value is a SharedInt16Array.
1934 * This is an experimental feature.
1935 */
1936 bool IsSharedInt16Array() const;
1937
1938 /**
1939 * Returns true if this value is a SharedUint32Array.
1940 * This is an experimental feature.
1941 */
1942 bool IsSharedUint32Array() const;
1943
1944 /**
1945 * Returns true if this value is a SharedInt32Array.
1946 * This is an experimental feature.
1947 */
1948 bool IsSharedInt32Array() const;
1949
1950 /**
1951 * Returns true if this value is a SharedFloat32Array.
1952 * This is an experimental feature.
1953 */
1954 bool IsSharedFloat32Array() const;
1955
1956 /**
1957 * Returns true if this value is a SharedFloat64Array.
1958 * This is an experimental feature.
1959 */
1960 bool IsSharedFloat64Array() const;
1961
1962
1896 V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean( 1963 V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
1897 Local<Context> context) const; 1964 Local<Context> context) const;
1898 V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber( 1965 V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
1899 Local<Context> context) const; 1966 Local<Context> context) const;
1900 V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString( 1967 V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
1901 Local<Context> context) const; 1968 Local<Context> context) const;
1902 V8_WARN_UNUSED_RESULT MaybeLocal<String> ToDetailString( 1969 V8_WARN_UNUSED_RESULT MaybeLocal<String> ToDetailString(
1903 Local<Context> context) const; 1970 Local<Context> context) const;
1904 V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( 1971 V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
1905 Local<Context> context) const; 1972 Local<Context> context) const;
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
3592 size_t byte_offset, size_t length); 3659 size_t byte_offset, size_t length);
3593 V8_INLINE static DataView* Cast(Value* obj); 3660 V8_INLINE static DataView* Cast(Value* obj);
3594 3661
3595 private: 3662 private:
3596 DataView(); 3663 DataView();
3597 static void CheckCast(Value* obj); 3664 static void CheckCast(Value* obj);
3598 }; 3665 };
3599 3666
3600 3667
3601 /** 3668 /**
3669 * TODO(binji): document
3670 * An instance of the built-in SharedArrayBuffer constructor (ES6 draft
3671 * 15.13.5).
3672 * This API is experimental and may change significantly.
3673 */
3674 class V8_EXPORT SharedArrayBuffer : public Object {
3675 public:
3676 /**
3677 * Allocator that V8 uses to allocate |SharedArrayBuffer|'s memory. The
3678 * allocator is a global V8 setting. It should be set with
3679 * V8::SetSharedArrayBufferAllocator prior to creation of a first
3680 * SharedArrayBuffer.
3681 *
3682 * This API is experimental and may change significantly.
3683 */
3684 class V8_EXPORT Allocator { // NOLINT
jochen (gone - plz use gerrit) 2015/04/28 18:31:46 why can't we use the allocator form ArrayBuffer?
binji 2015/04/29 18:27:22 Done.
3685 public:
3686 virtual ~Allocator() {}
3687
3688 /**
3689 * Allocate |length| bytes. Return NULL if allocation is not successful.
3690 * Memory should be initialized to zeroes.
3691 */
3692 virtual void* Allocate(size_t length) = 0;
3693
3694 /**
3695 * Allocate |length| bytes. Return NULL if allocation is not successful.
3696 * Memory does not have to be initialized.
3697 */
3698 virtual void* AllocateUninitialized(size_t length) = 0;
3699 /**
3700 * Free the memory block of size |length|, pointed to by |data|.
3701 * That memory is guaranteed to be previously allocated by |Allocate|.
3702 */
3703 virtual void Free(void* data, size_t length) = 0;
3704 };
3705
3706 /**
3707 * The contents of an |SharedArrayBuffer|. Externalization of
3708 * |SharedArrayBuffer| returns an instance of this class, populated, with a
3709 * pointer to data and byte length.
3710 *
3711 * The Data pointer of SharedArrayBuffer::Contents is always allocated with
3712 * Allocator::Allocate that is set with V8::SetSharedArrayBufferAllocator.
3713 *
3714 * This API is experimental and may change significantly.
3715 */
3716 class V8_EXPORT Contents { // NOLINT
3717 public:
3718 Contents() : data_(NULL), byte_length_(0) {}
3719
3720 void* Data() const { return data_; }
3721 size_t ByteLength() const { return byte_length_; }
3722
3723 private:
3724 void* data_;
3725 size_t byte_length_;
3726
3727 friend class SharedArrayBuffer;
3728 };
3729
3730
3731 /**
3732 * Data length in bytes.
3733 */
3734 size_t ByteLength() const;
3735
3736 /**
3737 * Create a new SharedArrayBuffer. Allocate |byte_length| bytes.
3738 * Allocated memory will be owned by a created SharedArrayBuffer and
3739 * will be deallocated when it is garbage-collected,
3740 * unless the object is externalized.
3741 */
3742 static Local<SharedArrayBuffer> New(Isolate* isolate, size_t byte_length);
3743
3744 /**
3745 * Create a new SharedArrayBuffer over an existing memory block.
3746 * The created array buffer is immediately in externalized state.
3747 * The memory block will not be reclaimed when a created SharedArrayBuffer
3748 * is garbage-collected.
3749 */
3750 static Local<SharedArrayBuffer> New(Isolate* isolate, void* data,
3751 size_t byte_length);
jochen (gone - plz use gerrit) 2015/04/28 18:31:46 we should have a version that creates an internali
binji 2015/04/29 18:27:22 Done.
3752
3753 /**
3754 * Returns true if SharedArrayBuffer is extrenalized, that is, does not
3755 * own its memory block.
3756 */
3757 bool IsExternal() const;
3758
3759 /**
3760 * Make this SharedArrayBuffer external. The pointer to underlying memory
3761 * block and byte length are returned as |Contents| structure. After
3762 * SharedArrayBuffer had been etxrenalized, it does no longer owns the memory
3763 * block. The caller should take steps to free memory when it is no longer
3764 * needed.
3765 *
3766 * The memory block is guaranteed to be allocated with |Allocator::Allocate|
3767 * that has been set with V8::SetSharedArrayBufferAllocator.
3768 */
3769 Contents Externalize();
jochen (gone - plz use gerrit) 2015/04/28 18:31:46 also add GetContents() that gets the contents with
binji 2015/04/29 18:27:22 Done.
3770
3771 V8_INLINE static SharedArrayBuffer* Cast(Value* obj);
3772
3773 static const int kInternalFieldCount = V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT;
3774
3775 private:
3776 SharedArrayBuffer();
3777 static void CheckCast(Value* obj);
3778 };
3779
3780
3781 /**
3782 * TODO(binji): document
3783 * A base class for an instance of TypedArray series of constructors
3784 * (ES6 draft 15.13.6).
3785 * This API is experimental and may change significantly.
3786 */
3787 class V8_EXPORT SharedTypedArray : public Object {
3788 public:
3789 /**
3790 * Returns underlying SharedArrayBuffer.
3791 */
3792 Local<SharedArrayBuffer> Buffer();
3793 /**
3794 * Byte offset in |Buffer|.
3795 */
3796 size_t ByteOffset();
3797 /**
3798 * Size of a view in bytes.
3799 */
3800 size_t ByteLength();
3801
3802 /**
3803 * Number of elements in this typed array
3804 * (e.g. for SharedInt16Array, |ByteLength|/2).
3805 */
3806 size_t Length();
3807
3808 V8_INLINE static SharedTypedArray* Cast(Value* obj);
3809
3810 private:
3811 SharedTypedArray();
3812 static void CheckCast(Value* obj);
3813 };
3814
3815
3816 /**
3817 * TODO(binji): document
3818 * An instance of Uint8Array constructor (ES6 draft 15.13.6).
3819 * This API is experimental and may change significantly.
3820 */
3821 class V8_EXPORT SharedUint8Array : public SharedTypedArray {
3822 public:
3823 static Local<SharedUint8Array> New(Handle<SharedArrayBuffer> array_buffer,
3824 size_t byte_offset, size_t length);
3825 V8_INLINE static SharedUint8Array* Cast(Value* obj);
3826
3827 private:
3828 SharedUint8Array();
3829 static void CheckCast(Value* obj);
3830 };
3831
3832
3833 /**
3834 * TODO(binji): document
3835 * An instance of Uint8ClampedArray constructor (ES6 draft 15.13.6).
3836 * This API is experimental and may change significantly.
3837 */
3838 class V8_EXPORT SharedUint8ClampedArray : public SharedTypedArray {
3839 public:
3840 static Local<SharedUint8ClampedArray> New(
3841 Handle<SharedArrayBuffer> array_buffer, size_t byte_offset,
3842 size_t length);
3843 V8_INLINE static SharedUint8ClampedArray* Cast(Value* obj);
3844
3845 private:
3846 SharedUint8ClampedArray();
3847 static void CheckCast(Value* obj);
3848 };
3849
3850 /**
3851 * TODO(binji): document
3852 * An instance of Int8Array constructor (ES6 draft 15.13.6).
3853 * This API is experimental and may change significantly.
3854 */
3855 class V8_EXPORT SharedInt8Array : public SharedTypedArray {
3856 public:
3857 static Local<SharedInt8Array> New(Handle<SharedArrayBuffer> array_buffer,
3858 size_t byte_offset, size_t length);
3859 V8_INLINE static SharedInt8Array* Cast(Value* obj);
3860
3861 private:
3862 SharedInt8Array();
3863 static void CheckCast(Value* obj);
3864 };
3865
3866
3867 /**
3868 * TODO(binji): document
3869 * An instance of Uint16Array constructor (ES6 draft 15.13.6).
3870 * This API is experimental and may change significantly.
3871 */
3872 class V8_EXPORT SharedUint16Array : public SharedTypedArray {
3873 public:
3874 static Local<SharedUint16Array> New(Handle<SharedArrayBuffer> array_buffer,
3875 size_t byte_offset, size_t length);
3876 V8_INLINE static SharedUint16Array* Cast(Value* obj);
3877
3878 private:
3879 SharedUint16Array();
3880 static void CheckCast(Value* obj);
3881 };
3882
3883
3884 /**
3885 * TODO(binji): document
3886 * An instance of Int16Array constructor (ES6 draft 15.13.6).
3887 * This API is experimental and may change significantly.
3888 */
3889 class V8_EXPORT SharedInt16Array : public SharedTypedArray {
3890 public:
3891 static Local<SharedInt16Array> New(Handle<SharedArrayBuffer> array_buffer,
3892 size_t byte_offset, size_t length);
3893 V8_INLINE static SharedInt16Array* Cast(Value* obj);
3894
3895 private:
3896 SharedInt16Array();
3897 static void CheckCast(Value* obj);
3898 };
3899
3900
3901 /**
3902 * TODO(binji): document
3903 * An instance of Uint32Array constructor (ES6 draft 15.13.6).
3904 * This API is experimental and may change significantly.
3905 */
3906 class V8_EXPORT SharedUint32Array : public SharedTypedArray {
3907 public:
3908 static Local<SharedUint32Array> New(Handle<SharedArrayBuffer> array_buffer,
3909 size_t byte_offset, size_t length);
3910 V8_INLINE static SharedUint32Array* Cast(Value* obj);
3911
3912 private:
3913 SharedUint32Array();
3914 static void CheckCast(Value* obj);
3915 };
3916
3917
3918 /**
3919 * TODO(binji): document
3920 * An instance of Int32Array constructor (ES6 draft 15.13.6).
3921 * This API is experimental and may change significantly.
3922 */
3923 class V8_EXPORT SharedInt32Array : public SharedTypedArray {
3924 public:
3925 static Local<SharedInt32Array> New(Handle<SharedArrayBuffer> array_buffer,
3926 size_t byte_offset, size_t length);
3927 V8_INLINE static SharedInt32Array* Cast(Value* obj);
3928
3929 private:
3930 SharedInt32Array();
3931 static void CheckCast(Value* obj);
3932 };
3933
3934
3935 /**
3936 * TODO(binji): document
3937 * An instance of Float32Array constructor (ES6 draft 15.13.6).
3938 * This API is experimental and may change significantly.
3939 */
3940 class V8_EXPORT SharedFloat32Array : public SharedTypedArray {
3941 public:
3942 static Local<SharedFloat32Array> New(Handle<SharedArrayBuffer> array_buffer,
3943 size_t byte_offset, size_t length);
3944 V8_INLINE static SharedFloat32Array* Cast(Value* obj);
3945
3946 private:
3947 SharedFloat32Array();
3948 static void CheckCast(Value* obj);
3949 };
3950
3951
3952 /**
3953 * TODO(binji): document
3954 * An instance of Float64Array constructor (ES6 draft 15.13.6).
3955 * This API is experimental and may change significantly.
3956 */
3957 class V8_EXPORT SharedFloat64Array : public SharedTypedArray {
3958 public:
3959 static Local<SharedFloat64Array> New(Handle<SharedArrayBuffer> array_buffer,
3960 size_t byte_offset, size_t length);
3961 V8_INLINE static SharedFloat64Array* Cast(Value* obj);
3962
3963 private:
3964 SharedFloat64Array();
3965 static void CheckCast(Value* obj);
3966 };
3967
3968
3969 /**
3602 * An instance of the built-in Date constructor (ECMA-262, 15.9). 3970 * An instance of the built-in Date constructor (ECMA-262, 15.9).
3603 */ 3971 */
3604 class V8_EXPORT Date : public Object { 3972 class V8_EXPORT Date : public Object {
3605 public: 3973 public:
3606 static V8_DEPRECATE_SOON("Use maybe version.", 3974 static V8_DEPRECATE_SOON("Use maybe version.",
3607 Local<Value> New(Isolate* isolate, double time)); 3975 Local<Value> New(Isolate* isolate, double time));
3608 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context, 3976 static V8_WARN_UNUSED_RESULT MaybeLocal<Value> New(Local<Context> context,
3609 double time); 3977 double time);
3610 3978
3611 /** 3979 /**
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
5698 6066
5699 /** 6067 /**
5700 * Set allocator to use for ArrayBuffer memory. 6068 * Set allocator to use for ArrayBuffer memory.
5701 * The allocator should be set only once. The allocator should be set 6069 * The allocator should be set only once. The allocator should be set
5702 * before any code tha uses ArrayBuffers is executed. 6070 * before any code tha uses ArrayBuffers is executed.
5703 * This allocator is used in all isolates. 6071 * This allocator is used in all isolates.
5704 */ 6072 */
5705 static void SetArrayBufferAllocator(ArrayBuffer::Allocator* allocator); 6073 static void SetArrayBufferAllocator(ArrayBuffer::Allocator* allocator);
5706 6074
5707 /** 6075 /**
6076 * Set allocator to use for SharedArrayBuffer memory.
6077 * The allocator should be set only once. The allocator should be set
6078 * before any code tha uses SharedArrayBuffers is executed.
6079 * This allocator is used in all isolates.
6080 */
6081 static void SetSharedArrayBufferAllocator(
jochen (gone - plz use gerrit) 2015/04/28 18:31:46 the allocator should be per isolate and passed in
binji 2015/04/29 18:27:22 Done.
6082 SharedArrayBuffer::Allocator* allocator);
6083
6084 /**
5708 * Check if V8 is dead and therefore unusable. This is the case after 6085 * Check if V8 is dead and therefore unusable. This is the case after
5709 * fatal errors such as out-of-memory situations. 6086 * fatal errors such as out-of-memory situations.
5710 */ 6087 */
5711 V8_INLINE static V8_DEPRECATE_SOON("no alternative", bool IsDead()); 6088 V8_INLINE static V8_DEPRECATE_SOON("no alternative", bool IsDead());
5712 6089
5713 /** 6090 /**
5714 * Hand startup data to V8, in case the embedder has chosen to build 6091 * Hand startup data to V8, in case the embedder has chosen to build
5715 * V8 with external startup data. 6092 * V8 with external startup data.
5716 * 6093 *
5717 * Note: 6094 * Note:
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
6650 static const int kHeapObjectMapOffset = 0; 7027 static const int kHeapObjectMapOffset = 0;
6651 static const int kMapInstanceTypeAndBitFieldOffset = 7028 static const int kMapInstanceTypeAndBitFieldOffset =
6652 1 * kApiPointerSize + kApiIntSize; 7029 1 * kApiPointerSize + kApiIntSize;
6653 static const int kStringResourceOffset = 3 * kApiPointerSize; 7030 static const int kStringResourceOffset = 3 * kApiPointerSize;
6654 7031
6655 static const int kOddballKindOffset = 3 * kApiPointerSize; 7032 static const int kOddballKindOffset = 3 * kApiPointerSize;
6656 static const int kForeignAddressOffset = kApiPointerSize; 7033 static const int kForeignAddressOffset = kApiPointerSize;
6657 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; 7034 static const int kJSObjectHeaderSize = 3 * kApiPointerSize;
6658 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; 7035 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize;
6659 static const int kContextHeaderSize = 2 * kApiPointerSize; 7036 static const int kContextHeaderSize = 2 * kApiPointerSize;
6660 static const int kContextEmbedderDataIndex = 76; 7037 static const int kContextEmbedderDataIndex = 95;
6661 static const int kFullStringRepresentationMask = 0x07; 7038 static const int kFullStringRepresentationMask = 0x07;
6662 static const int kStringEncodingMask = 0x4; 7039 static const int kStringEncodingMask = 0x4;
6663 static const int kExternalTwoByteRepresentationTag = 0x02; 7040 static const int kExternalTwoByteRepresentationTag = 0x02;
6664 static const int kExternalOneByteRepresentationTag = 0x06; 7041 static const int kExternalOneByteRepresentationTag = 0x06;
6665 7042
6666 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; 7043 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize;
6667 static const int kAmountOfExternalAllocatedMemoryOffset = 7044 static const int kAmountOfExternalAllocatedMemoryOffset =
6668 4 * kApiPointerSize; 7045 4 * kApiPointerSize;
6669 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = 7046 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset =
6670 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; 7047 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size;
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
7701 8078
7702 8079
7703 DataView* DataView::Cast(v8::Value* value) { 8080 DataView* DataView::Cast(v8::Value* value) {
7704 #ifdef V8_ENABLE_CHECKS 8081 #ifdef V8_ENABLE_CHECKS
7705 CheckCast(value); 8082 CheckCast(value);
7706 #endif 8083 #endif
7707 return static_cast<DataView*>(value); 8084 return static_cast<DataView*>(value);
7708 } 8085 }
7709 8086
7710 8087
8088 SharedArrayBuffer* SharedArrayBuffer::Cast(v8::Value* value) {
8089 #ifdef V8_ENABLE_CHECKS
8090 CheckCast(value);
8091 #endif
8092 return static_cast<SharedArrayBuffer*>(value);
8093 }
8094
8095
8096 SharedTypedArray* SharedTypedArray::Cast(v8::Value* value) {
8097 #ifdef V8_ENABLE_CHECKS
8098 CheckCast(value);
8099 #endif
8100 return static_cast<SharedTypedArray*>(value);
8101 }
8102
8103
8104 SharedUint8Array* SharedUint8Array::Cast(v8::Value* value) {
8105 #ifdef V8_ENABLE_CHECKS
8106 CheckCast(value);
8107 #endif
8108 return static_cast<SharedUint8Array*>(value);
8109 }
8110
8111
8112 SharedInt8Array* SharedInt8Array::Cast(v8::Value* value) {
8113 #ifdef V8_ENABLE_CHECKS
8114 CheckCast(value);
8115 #endif
8116 return static_cast<SharedInt8Array*>(value);
8117 }
8118
8119
8120 SharedUint16Array* SharedUint16Array::Cast(v8::Value* value) {
8121 #ifdef V8_ENABLE_CHECKS
8122 CheckCast(value);
8123 #endif
8124 return static_cast<SharedUint16Array*>(value);
8125 }
8126
8127
8128 SharedInt16Array* SharedInt16Array::Cast(v8::Value* value) {
8129 #ifdef V8_ENABLE_CHECKS
8130 CheckCast(value);
8131 #endif
8132 return static_cast<SharedInt16Array*>(value);
8133 }
8134
8135
8136 SharedUint32Array* SharedUint32Array::Cast(v8::Value* value) {
8137 #ifdef V8_ENABLE_CHECKS
8138 CheckCast(value);
8139 #endif
8140 return static_cast<SharedUint32Array*>(value);
8141 }
8142
8143
8144 SharedInt32Array* SharedInt32Array::Cast(v8::Value* value) {
8145 #ifdef V8_ENABLE_CHECKS
8146 CheckCast(value);
8147 #endif
8148 return static_cast<SharedInt32Array*>(value);
8149 }
8150
8151
8152 SharedFloat32Array* SharedFloat32Array::Cast(v8::Value* value) {
8153 #ifdef V8_ENABLE_CHECKS
8154 CheckCast(value);
8155 #endif
8156 return static_cast<SharedFloat32Array*>(value);
8157 }
8158
8159
8160 SharedFloat64Array* SharedFloat64Array::Cast(v8::Value* value) {
8161 #ifdef V8_ENABLE_CHECKS
8162 CheckCast(value);
8163 #endif
8164 return static_cast<SharedFloat64Array*>(value);
8165 }
8166
8167
8168 SharedUint8ClampedArray* SharedUint8ClampedArray::Cast(v8::Value* value) {
8169 #ifdef V8_ENABLE_CHECKS
8170 CheckCast(value);
8171 #endif
8172 return static_cast<SharedUint8ClampedArray*>(value);
8173 }
8174
8175
7711 Function* Function::Cast(v8::Value* value) { 8176 Function* Function::Cast(v8::Value* value) {
7712 #ifdef V8_ENABLE_CHECKS 8177 #ifdef V8_ENABLE_CHECKS
7713 CheckCast(value); 8178 CheckCast(value);
7714 #endif 8179 #endif
7715 return static_cast<Function*>(value); 8180 return static_cast<Function*>(value);
7716 } 8181 }
7717 8182
7718 8183
7719 External* External::Cast(v8::Value* value) { 8184 External* External::Cast(v8::Value* value) {
7720 #ifdef V8_ENABLE_CHECKS 8185 #ifdef V8_ENABLE_CHECKS
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
8006 */ 8471 */
8007 8472
8008 8473
8009 } // namespace v8 8474 } // namespace v8
8010 8475
8011 8476
8012 #undef TYPE_CHECK 8477 #undef TYPE_CHECK
8013 8478
8014 8479
8015 #endif // V8_H_ 8480 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/accessors.cc » ('j') | src/accessors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698