OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3156 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); | 3156 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
3157 }; | 3157 }; |
3158 | 3158 |
3159 | 3159 |
3160 // FixedDoubleArray describes fixed-sized arrays with element type double. | 3160 // FixedDoubleArray describes fixed-sized arrays with element type double. |
3161 class FixedDoubleArray: public FixedArrayBase { | 3161 class FixedDoubleArray: public FixedArrayBase { |
3162 public: | 3162 public: |
3163 // Setter and getter for elements. | 3163 // Setter and getter for elements. |
3164 inline double get_scalar(int index); | 3164 inline double get_scalar(int index); |
3165 inline int64_t get_representation(int index); | 3165 inline int64_t get_representation(int index); |
3166 MUST_USE_RESULT inline MaybeObject* get(int index); | |
3167 static inline Handle<Object> get(Handle<FixedDoubleArray> array, int index); | 3166 static inline Handle<Object> get(Handle<FixedDoubleArray> array, int index); |
3168 inline void set(int index, double value); | 3167 inline void set(int index, double value); |
3169 inline void set_the_hole(int index); | 3168 inline void set_the_hole(int index); |
3170 | 3169 |
3171 // Checking for the hole. | 3170 // Checking for the hole. |
3172 inline bool is_the_hole(int index); | 3171 inline bool is_the_hole(int index); |
3173 | 3172 |
3174 // Copy operations | 3173 // Copy operations |
3175 MUST_USE_RESULT inline MaybeObject* Copy(); | 3174 MUST_USE_RESULT inline MaybeObject* Copy(); |
3176 | 3175 |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4910 // http://www.whatwg.org/specs/web-apps/current-work/ | 4909 // http://www.whatwg.org/specs/web-apps/current-work/ |
4911 // multipage/the-canvas-element.html#canvaspixelarray | 4910 // multipage/the-canvas-element.html#canvaspixelarray |
4912 // In particular, write access clamps the value written to 0 or 255 if the | 4911 // In particular, write access clamps the value written to 0 or 255 if the |
4913 // value written is outside this range. | 4912 // value written is outside this range. |
4914 class ExternalUint8ClampedArray: public ExternalArray { | 4913 class ExternalUint8ClampedArray: public ExternalArray { |
4915 public: | 4914 public: |
4916 inline uint8_t* external_uint8_clamped_pointer(); | 4915 inline uint8_t* external_uint8_clamped_pointer(); |
4917 | 4916 |
4918 // Setter and getter. | 4917 // Setter and getter. |
4919 inline uint8_t get_scalar(int index); | 4918 inline uint8_t get_scalar(int index); |
4920 MUST_USE_RESULT inline Object* get(int index); | |
4921 static inline Handle<Object> get(Handle<ExternalUint8ClampedArray> array, | 4919 static inline Handle<Object> get(Handle<ExternalUint8ClampedArray> array, |
4922 int index); | 4920 int index); |
4923 inline void set(int index, uint8_t value); | 4921 inline void set(int index, uint8_t value); |
4924 | 4922 |
4925 // This accessor applies the correct conversion from Smi, HeapNumber | 4923 // This accessor applies the correct conversion from Smi, HeapNumber |
4926 // and undefined and clamps the converted value between 0 and 255. | 4924 // and undefined and clamps the converted value between 0 and 255. |
4927 static Handle<Object> SetValue(Handle<ExternalUint8ClampedArray> array, | 4925 static Handle<Object> SetValue(Handle<ExternalUint8ClampedArray> array, |
4928 uint32_t index, | 4926 uint32_t index, |
4929 Handle<Object> value); | 4927 Handle<Object> value); |
4930 | 4928 |
4931 // Casting. | 4929 // Casting. |
4932 static inline ExternalUint8ClampedArray* cast(Object* obj); | 4930 static inline ExternalUint8ClampedArray* cast(Object* obj); |
4933 | 4931 |
4934 // Dispatched behavior. | 4932 // Dispatched behavior. |
4935 DECLARE_PRINTER(ExternalUint8ClampedArray) | 4933 DECLARE_PRINTER(ExternalUint8ClampedArray) |
4936 DECLARE_VERIFIER(ExternalUint8ClampedArray) | 4934 DECLARE_VERIFIER(ExternalUint8ClampedArray) |
4937 | 4935 |
4938 private: | 4936 private: |
4939 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint8ClampedArray); | 4937 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint8ClampedArray); |
4940 }; | 4938 }; |
4941 | 4939 |
4942 | 4940 |
4943 class ExternalInt8Array: public ExternalArray { | 4941 class ExternalInt8Array: public ExternalArray { |
4944 public: | 4942 public: |
4945 // Setter and getter. | 4943 // Setter and getter. |
4946 inline int8_t get_scalar(int index); | 4944 inline int8_t get_scalar(int index); |
4947 MUST_USE_RESULT inline Object* get(int index); | |
4948 static inline Handle<Object> get(Handle<ExternalInt8Array> array, int index); | 4945 static inline Handle<Object> get(Handle<ExternalInt8Array> array, int index); |
4949 inline void set(int index, int8_t value); | 4946 inline void set(int index, int8_t value); |
4950 | 4947 |
4951 // This accessor applies the correct conversion from Smi, HeapNumber | 4948 // This accessor applies the correct conversion from Smi, HeapNumber |
4952 // and undefined. | 4949 // and undefined. |
4953 static Handle<Object> SetValue(Handle<ExternalInt8Array> array, | 4950 static Handle<Object> SetValue(Handle<ExternalInt8Array> array, |
4954 uint32_t index, | 4951 uint32_t index, |
4955 Handle<Object> value); | 4952 Handle<Object> value); |
4956 | 4953 |
4957 // Casting. | 4954 // Casting. |
4958 static inline ExternalInt8Array* cast(Object* obj); | 4955 static inline ExternalInt8Array* cast(Object* obj); |
4959 | 4956 |
4960 // Dispatched behavior. | 4957 // Dispatched behavior. |
4961 DECLARE_PRINTER(ExternalInt8Array) | 4958 DECLARE_PRINTER(ExternalInt8Array) |
4962 DECLARE_VERIFIER(ExternalInt8Array) | 4959 DECLARE_VERIFIER(ExternalInt8Array) |
4963 | 4960 |
4964 private: | 4961 private: |
4965 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt8Array); | 4962 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt8Array); |
4966 }; | 4963 }; |
4967 | 4964 |
4968 | 4965 |
4969 class ExternalUint8Array: public ExternalArray { | 4966 class ExternalUint8Array: public ExternalArray { |
4970 public: | 4967 public: |
4971 // Setter and getter. | 4968 // Setter and getter. |
4972 inline uint8_t get_scalar(int index); | 4969 inline uint8_t get_scalar(int index); |
4973 MUST_USE_RESULT inline Object* get(int index); | |
4974 static inline Handle<Object> get(Handle<ExternalUint8Array> array, int index); | 4970 static inline Handle<Object> get(Handle<ExternalUint8Array> array, int index); |
4975 inline void set(int index, uint8_t value); | 4971 inline void set(int index, uint8_t value); |
4976 | 4972 |
4977 // This accessor applies the correct conversion from Smi, HeapNumber | 4973 // This accessor applies the correct conversion from Smi, HeapNumber |
4978 // and undefined. | 4974 // and undefined. |
4979 static Handle<Object> SetValue(Handle<ExternalUint8Array> array, | 4975 static Handle<Object> SetValue(Handle<ExternalUint8Array> array, |
4980 uint32_t index, | 4976 uint32_t index, |
4981 Handle<Object> value); | 4977 Handle<Object> value); |
4982 | 4978 |
4983 // Casting. | 4979 // Casting. |
4984 static inline ExternalUint8Array* cast(Object* obj); | 4980 static inline ExternalUint8Array* cast(Object* obj); |
4985 | 4981 |
4986 // Dispatched behavior. | 4982 // Dispatched behavior. |
4987 DECLARE_PRINTER(ExternalUint8Array) | 4983 DECLARE_PRINTER(ExternalUint8Array) |
4988 DECLARE_VERIFIER(ExternalUint8Array) | 4984 DECLARE_VERIFIER(ExternalUint8Array) |
4989 | 4985 |
4990 private: | 4986 private: |
4991 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint8Array); | 4987 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint8Array); |
4992 }; | 4988 }; |
4993 | 4989 |
4994 | 4990 |
4995 class ExternalInt16Array: public ExternalArray { | 4991 class ExternalInt16Array: public ExternalArray { |
4996 public: | 4992 public: |
4997 // Setter and getter. | 4993 // Setter and getter. |
4998 inline int16_t get_scalar(int index); | 4994 inline int16_t get_scalar(int index); |
4999 MUST_USE_RESULT inline Object* get(int index); | |
5000 static inline Handle<Object> get(Handle<ExternalInt16Array> array, int index); | 4995 static inline Handle<Object> get(Handle<ExternalInt16Array> array, int index); |
5001 inline void set(int index, int16_t value); | 4996 inline void set(int index, int16_t value); |
5002 | 4997 |
5003 // This accessor applies the correct conversion from Smi, HeapNumber | 4998 // This accessor applies the correct conversion from Smi, HeapNumber |
5004 // and undefined. | 4999 // and undefined. |
5005 static Handle<Object> SetValue(Handle<ExternalInt16Array> array, | 5000 static Handle<Object> SetValue(Handle<ExternalInt16Array> array, |
5006 uint32_t index, | 5001 uint32_t index, |
5007 Handle<Object> value); | 5002 Handle<Object> value); |
5008 | 5003 |
5009 // Casting. | 5004 // Casting. |
5010 static inline ExternalInt16Array* cast(Object* obj); | 5005 static inline ExternalInt16Array* cast(Object* obj); |
5011 | 5006 |
5012 // Dispatched behavior. | 5007 // Dispatched behavior. |
5013 DECLARE_PRINTER(ExternalInt16Array) | 5008 DECLARE_PRINTER(ExternalInt16Array) |
5014 DECLARE_VERIFIER(ExternalInt16Array) | 5009 DECLARE_VERIFIER(ExternalInt16Array) |
5015 | 5010 |
5016 private: | 5011 private: |
5017 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt16Array); | 5012 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt16Array); |
5018 }; | 5013 }; |
5019 | 5014 |
5020 | 5015 |
5021 class ExternalUint16Array: public ExternalArray { | 5016 class ExternalUint16Array: public ExternalArray { |
5022 public: | 5017 public: |
5023 // Setter and getter. | 5018 // Setter and getter. |
5024 inline uint16_t get_scalar(int index); | 5019 inline uint16_t get_scalar(int index); |
5025 MUST_USE_RESULT inline Object* get(int index); | |
5026 static inline Handle<Object> get(Handle<ExternalUint16Array> array, | 5020 static inline Handle<Object> get(Handle<ExternalUint16Array> array, |
5027 int index); | 5021 int index); |
5028 inline void set(int index, uint16_t value); | 5022 inline void set(int index, uint16_t value); |
5029 | 5023 |
5030 // This accessor applies the correct conversion from Smi, HeapNumber | 5024 // This accessor applies the correct conversion from Smi, HeapNumber |
5031 // and undefined. | 5025 // and undefined. |
5032 static Handle<Object> SetValue(Handle<ExternalUint16Array> array, | 5026 static Handle<Object> SetValue(Handle<ExternalUint16Array> array, |
5033 uint32_t index, | 5027 uint32_t index, |
5034 Handle<Object> value); | 5028 Handle<Object> value); |
5035 | 5029 |
5036 // Casting. | 5030 // Casting. |
5037 static inline ExternalUint16Array* cast(Object* obj); | 5031 static inline ExternalUint16Array* cast(Object* obj); |
5038 | 5032 |
5039 // Dispatched behavior. | 5033 // Dispatched behavior. |
5040 DECLARE_PRINTER(ExternalUint16Array) | 5034 DECLARE_PRINTER(ExternalUint16Array) |
5041 DECLARE_VERIFIER(ExternalUint16Array) | 5035 DECLARE_VERIFIER(ExternalUint16Array) |
5042 | 5036 |
5043 private: | 5037 private: |
5044 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint16Array); | 5038 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint16Array); |
5045 }; | 5039 }; |
5046 | 5040 |
5047 | 5041 |
5048 class ExternalInt32Array: public ExternalArray { | 5042 class ExternalInt32Array: public ExternalArray { |
5049 public: | 5043 public: |
5050 // Setter and getter. | 5044 // Setter and getter. |
5051 inline int32_t get_scalar(int index); | 5045 inline int32_t get_scalar(int index); |
5052 MUST_USE_RESULT inline MaybeObject* get(int index); | |
5053 static inline Handle<Object> get(Handle<ExternalInt32Array> array, int index); | 5046 static inline Handle<Object> get(Handle<ExternalInt32Array> array, int index); |
5054 inline void set(int index, int32_t value); | 5047 inline void set(int index, int32_t value); |
5055 | 5048 |
5056 // This accessor applies the correct conversion from Smi, HeapNumber | 5049 // This accessor applies the correct conversion from Smi, HeapNumber |
5057 // and undefined. | 5050 // and undefined. |
5058 static Handle<Object> SetValue(Handle<ExternalInt32Array> array, | 5051 static Handle<Object> SetValue(Handle<ExternalInt32Array> array, |
5059 uint32_t index, | 5052 uint32_t index, |
5060 Handle<Object> value); | 5053 Handle<Object> value); |
5061 | 5054 |
5062 // Casting. | 5055 // Casting. |
5063 static inline ExternalInt32Array* cast(Object* obj); | 5056 static inline ExternalInt32Array* cast(Object* obj); |
5064 | 5057 |
5065 // Dispatched behavior. | 5058 // Dispatched behavior. |
5066 DECLARE_PRINTER(ExternalInt32Array) | 5059 DECLARE_PRINTER(ExternalInt32Array) |
5067 DECLARE_VERIFIER(ExternalInt32Array) | 5060 DECLARE_VERIFIER(ExternalInt32Array) |
5068 | 5061 |
5069 private: | 5062 private: |
5070 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt32Array); | 5063 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalInt32Array); |
5071 }; | 5064 }; |
5072 | 5065 |
5073 | 5066 |
5074 class ExternalUint32Array: public ExternalArray { | 5067 class ExternalUint32Array: public ExternalArray { |
5075 public: | 5068 public: |
5076 // Setter and getter. | 5069 // Setter and getter. |
5077 inline uint32_t get_scalar(int index); | 5070 inline uint32_t get_scalar(int index); |
5078 MUST_USE_RESULT inline MaybeObject* get(int index); | |
5079 static inline Handle<Object> get(Handle<ExternalUint32Array> array, | 5071 static inline Handle<Object> get(Handle<ExternalUint32Array> array, |
5080 int index); | 5072 int index); |
5081 inline void set(int index, uint32_t value); | 5073 inline void set(int index, uint32_t value); |
5082 | 5074 |
5083 // This accessor applies the correct conversion from Smi, HeapNumber | 5075 // This accessor applies the correct conversion from Smi, HeapNumber |
5084 // and undefined. | 5076 // and undefined. |
5085 static Handle<Object> SetValue(Handle<ExternalUint32Array> array, | 5077 static Handle<Object> SetValue(Handle<ExternalUint32Array> array, |
5086 uint32_t index, | 5078 uint32_t index, |
5087 Handle<Object> value); | 5079 Handle<Object> value); |
5088 | 5080 |
5089 // Casting. | 5081 // Casting. |
5090 static inline ExternalUint32Array* cast(Object* obj); | 5082 static inline ExternalUint32Array* cast(Object* obj); |
5091 | 5083 |
5092 // Dispatched behavior. | 5084 // Dispatched behavior. |
5093 DECLARE_PRINTER(ExternalUint32Array) | 5085 DECLARE_PRINTER(ExternalUint32Array) |
5094 DECLARE_VERIFIER(ExternalUint32Array) | 5086 DECLARE_VERIFIER(ExternalUint32Array) |
5095 | 5087 |
5096 private: | 5088 private: |
5097 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint32Array); | 5089 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalUint32Array); |
5098 }; | 5090 }; |
5099 | 5091 |
5100 | 5092 |
5101 class ExternalFloat32Array: public ExternalArray { | 5093 class ExternalFloat32Array: public ExternalArray { |
5102 public: | 5094 public: |
5103 // Setter and getter. | 5095 // Setter and getter. |
5104 inline float get_scalar(int index); | 5096 inline float get_scalar(int index); |
5105 MUST_USE_RESULT inline MaybeObject* get(int index); | |
5106 static inline Handle<Object> get(Handle<ExternalFloat32Array> array, | 5097 static inline Handle<Object> get(Handle<ExternalFloat32Array> array, |
5107 int index); | 5098 int index); |
5108 inline void set(int index, float value); | 5099 inline void set(int index, float value); |
5109 | 5100 |
5110 // This accessor applies the correct conversion from Smi, HeapNumber | 5101 // This accessor applies the correct conversion from Smi, HeapNumber |
5111 // and undefined. | 5102 // and undefined. |
5112 static Handle<Object> SetValue(Handle<ExternalFloat32Array> array, | 5103 static Handle<Object> SetValue(Handle<ExternalFloat32Array> array, |
5113 uint32_t index, | 5104 uint32_t index, |
5114 Handle<Object> value); | 5105 Handle<Object> value); |
5115 | 5106 |
5116 // Casting. | 5107 // Casting. |
5117 static inline ExternalFloat32Array* cast(Object* obj); | 5108 static inline ExternalFloat32Array* cast(Object* obj); |
5118 | 5109 |
5119 // Dispatched behavior. | 5110 // Dispatched behavior. |
5120 DECLARE_PRINTER(ExternalFloat32Array) | 5111 DECLARE_PRINTER(ExternalFloat32Array) |
5121 DECLARE_VERIFIER(ExternalFloat32Array) | 5112 DECLARE_VERIFIER(ExternalFloat32Array) |
5122 | 5113 |
5123 private: | 5114 private: |
5124 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat32Array); | 5115 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat32Array); |
5125 }; | 5116 }; |
5126 | 5117 |
5127 | 5118 |
5128 class ExternalFloat64Array: public ExternalArray { | 5119 class ExternalFloat64Array: public ExternalArray { |
5129 public: | 5120 public: |
5130 // Setter and getter. | 5121 // Setter and getter. |
5131 inline double get_scalar(int index); | 5122 inline double get_scalar(int index); |
5132 MUST_USE_RESULT inline MaybeObject* get(int index); | |
5133 static inline Handle<Object> get(Handle<ExternalFloat64Array> array, | 5123 static inline Handle<Object> get(Handle<ExternalFloat64Array> array, |
5134 int index); | 5124 int index); |
5135 inline void set(int index, double value); | 5125 inline void set(int index, double value); |
5136 | 5126 |
5137 // This accessor applies the correct conversion from Smi, HeapNumber | 5127 // This accessor applies the correct conversion from Smi, HeapNumber |
5138 // and undefined. | 5128 // and undefined. |
5139 static Handle<Object> SetValue(Handle<ExternalFloat64Array> array, | 5129 static Handle<Object> SetValue(Handle<ExternalFloat64Array> array, |
5140 uint32_t index, | 5130 uint32_t index, |
5141 Handle<Object> value); | 5131 Handle<Object> value); |
5142 | 5132 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5182 | 5172 |
5183 static inline int ElementOffset(int index) { | 5173 static inline int ElementOffset(int index) { |
5184 return kDataOffset + index * sizeof(ElementType); | 5174 return kDataOffset + index * sizeof(ElementType); |
5185 } | 5175 } |
5186 | 5176 |
5187 static inline int SizeFor(int length) { | 5177 static inline int SizeFor(int length) { |
5188 return ElementOffset(length); | 5178 return ElementOffset(length); |
5189 } | 5179 } |
5190 | 5180 |
5191 inline ElementType get_scalar(int index); | 5181 inline ElementType get_scalar(int index); |
5192 MUST_USE_RESULT inline MaybeObject* get(int index); | |
5193 static inline Handle<Object> get(Handle<FixedTypedArray> array, int index); | 5182 static inline Handle<Object> get(Handle<FixedTypedArray> array, int index); |
5194 inline void set(int index, ElementType value); | 5183 inline void set(int index, ElementType value); |
5195 | 5184 |
5196 static inline ElementType from_int(int value); | 5185 static inline ElementType from_int(int value); |
5197 static inline ElementType from_double(double value); | 5186 static inline ElementType from_double(double value); |
5198 | 5187 |
5199 // This accessor applies the correct conversion from Smi, HeapNumber | 5188 // This accessor applies the correct conversion from Smi, HeapNumber |
5200 // and undefined. | 5189 // and undefined. |
5201 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); | |
5202 | |
5203 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array, | 5190 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array, |
5204 uint32_t index, | 5191 uint32_t index, |
5205 Handle<Object> value); | 5192 Handle<Object> value); |
5206 | 5193 |
5207 DECLARE_PRINTER(FixedTypedArray) | 5194 DECLARE_PRINTER(FixedTypedArray) |
5208 DECLARE_VERIFIER(FixedTypedArray) | 5195 DECLARE_VERIFIER(FixedTypedArray) |
5209 | 5196 |
5210 private: | 5197 private: |
5211 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); | 5198 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); |
5212 }; | 5199 }; |
5213 | 5200 |
5214 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \ | 5201 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \ |
5215 class Type##ArrayTraits { \ | 5202 class Type##ArrayTraits { \ |
5216 public: \ | 5203 public: \ |
5217 typedef elementType ElementType; \ | 5204 typedef elementType ElementType; \ |
5218 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \ | 5205 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \ |
5219 static const char* Designator() { return #type " array"; } \ | 5206 static const char* Designator() { return #type " array"; } \ |
5220 static inline MaybeObject* ToObject(Heap* heap, elementType scalar); \ | |
5221 static inline Handle<Object> ToHandle(Isolate* isolate, \ | 5207 static inline Handle<Object> ToHandle(Isolate* isolate, \ |
5222 elementType scalar); \ | 5208 elementType scalar); \ |
5223 static inline elementType defaultValue(); \ | 5209 static inline elementType defaultValue(); \ |
5224 }; \ | 5210 }; \ |
5225 \ | 5211 \ |
5226 typedef FixedTypedArray<Type##ArrayTraits> Fixed##Type##Array; | 5212 typedef FixedTypedArray<Type##ArrayTraits> Fixed##Type##Array; |
5227 | 5213 |
5228 TYPED_ARRAYS(FIXED_TYPED_ARRAY_TRAITS) | 5214 TYPED_ARRAYS(FIXED_TYPED_ARRAY_TRAITS) |
5229 | 5215 |
5230 #undef FIXED_TYPED_ARRAY_TRAITS | 5216 #undef FIXED_TYPED_ARRAY_TRAITS |
(...skipping 5831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11062 } else { | 11048 } else { |
11063 value &= ~(1 << bit_position); | 11049 value &= ~(1 << bit_position); |
11064 } | 11050 } |
11065 return value; | 11051 return value; |
11066 } | 11052 } |
11067 }; | 11053 }; |
11068 | 11054 |
11069 } } // namespace v8::internal | 11055 } } // namespace v8::internal |
11070 | 11056 |
11071 #endif // V8_OBJECTS_H_ | 11057 #endif // V8_OBJECTS_H_ |
OLD | NEW |