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

Side by Side Diff: src/objects.h

Issue 101413006: Implement in-heap backing store for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Self-review Created 7 years 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 | Annotate | Revision Log
OLDNEW
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 /* Object::IsExternalArray(). */ \ 379 /* Object::IsExternalArray(). */ \
380 V(EXTERNAL_BYTE_ARRAY_TYPE) \ 380 V(EXTERNAL_BYTE_ARRAY_TYPE) \
381 V(EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE) \ 381 V(EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE) \
382 V(EXTERNAL_SHORT_ARRAY_TYPE) \ 382 V(EXTERNAL_SHORT_ARRAY_TYPE) \
383 V(EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE) \ 383 V(EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE) \
384 V(EXTERNAL_INT_ARRAY_TYPE) \ 384 V(EXTERNAL_INT_ARRAY_TYPE) \
385 V(EXTERNAL_UNSIGNED_INT_ARRAY_TYPE) \ 385 V(EXTERNAL_UNSIGNED_INT_ARRAY_TYPE) \
386 V(EXTERNAL_FLOAT_ARRAY_TYPE) \ 386 V(EXTERNAL_FLOAT_ARRAY_TYPE) \
387 V(EXTERNAL_DOUBLE_ARRAY_TYPE) \ 387 V(EXTERNAL_DOUBLE_ARRAY_TYPE) \
388 V(EXTERNAL_PIXEL_ARRAY_TYPE) \ 388 V(EXTERNAL_PIXEL_ARRAY_TYPE) \
389 \
390 V(FIXED_INT8_ARRAY_TYPE) \
391 V(FIXED_UINT8_ARRAY_TYPE) \
392 V(FIXED_INT16_ARRAY_TYPE) \
393 V(FIXED_UINT16_ARRAY_TYPE) \
394 V(FIXED_INT32_ARRAY_TYPE) \
395 V(FIXED_UINT32_ARRAY_TYPE) \
396 V(FIXED_FLOAT32_ARRAY_TYPE) \
397 V(FIXED_FLOAT64_ARRAY_TYPE) \
398 V(FIXED_UINT8_CLAMPED_ARRAY_TYPE) \
399 \
389 V(FILLER_TYPE) \ 400 V(FILLER_TYPE) \
390 \ 401 \
391 V(DECLARED_ACCESSOR_DESCRIPTOR_TYPE) \ 402 V(DECLARED_ACCESSOR_DESCRIPTOR_TYPE) \
392 V(DECLARED_ACCESSOR_INFO_TYPE) \ 403 V(DECLARED_ACCESSOR_INFO_TYPE) \
393 V(EXECUTABLE_ACCESSOR_INFO_TYPE) \ 404 V(EXECUTABLE_ACCESSOR_INFO_TYPE) \
394 V(ACCESSOR_PAIR_TYPE) \ 405 V(ACCESSOR_PAIR_TYPE) \
395 V(ACCESS_CHECK_INFO_TYPE) \ 406 V(ACCESS_CHECK_INFO_TYPE) \
396 V(INTERCEPTOR_INFO_TYPE) \ 407 V(INTERCEPTOR_INFO_TYPE) \
397 V(CALL_HANDLER_INFO_TYPE) \ 408 V(CALL_HANDLER_INFO_TYPE) \
398 V(FUNCTION_TEMPLATE_INFO_TYPE) \ 409 V(FUNCTION_TEMPLATE_INFO_TYPE) \
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 FREE_SPACE_TYPE, 724 FREE_SPACE_TYPE,
714 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE 725 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE
715 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, 726 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE,
716 EXTERNAL_SHORT_ARRAY_TYPE, 727 EXTERNAL_SHORT_ARRAY_TYPE,
717 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, 728 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE,
718 EXTERNAL_INT_ARRAY_TYPE, 729 EXTERNAL_INT_ARRAY_TYPE,
719 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, 730 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE,
720 EXTERNAL_FLOAT_ARRAY_TYPE, 731 EXTERNAL_FLOAT_ARRAY_TYPE,
721 EXTERNAL_DOUBLE_ARRAY_TYPE, 732 EXTERNAL_DOUBLE_ARRAY_TYPE,
722 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE 733 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE
734
735 FIXED_INT8_ARRAY_TYPE, // FIRST_FIXED_TYPED_ARRAY_TYPE
736 FIXED_UINT8_ARRAY_TYPE,
737 FIXED_INT16_ARRAY_TYPE,
738 FIXED_UINT16_ARRAY_TYPE,
739 FIXED_INT32_ARRAY_TYPE,
740 FIXED_UINT32_ARRAY_TYPE,
741 FIXED_FLOAT32_ARRAY_TYPE,
742 FIXED_FLOAT64_ARRAY_TYPE,
743 FIXED_UINT8_CLAMPED_ARRAY_TYPE, // LAST_FIXED_TYPED_ARRAY_TYPE
744
723 FIXED_DOUBLE_ARRAY_TYPE, 745 FIXED_DOUBLE_ARRAY_TYPE,
724 CONSTANT_POOL_ARRAY_TYPE, 746 CONSTANT_POOL_ARRAY_TYPE,
725 FILLER_TYPE, // LAST_DATA_TYPE 747 FILLER_TYPE, // LAST_DATA_TYPE
726 748
727 // Structs. 749 // Structs.
728 DECLARED_ACCESSOR_DESCRIPTOR_TYPE, 750 DECLARED_ACCESSOR_DESCRIPTOR_TYPE,
729 DECLARED_ACCESSOR_INFO_TYPE, 751 DECLARED_ACCESSOR_INFO_TYPE,
730 EXECUTABLE_ACCESSOR_INFO_TYPE, 752 EXECUTABLE_ACCESSOR_INFO_TYPE,
731 ACCESSOR_PAIR_TYPE, 753 ACCESSOR_PAIR_TYPE,
732 ACCESS_CHECK_INFO_TYPE, 754 ACCESS_CHECK_INFO_TYPE,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 FIRST_TYPE = 0x0, 812 FIRST_TYPE = 0x0,
791 LAST_TYPE = JS_FUNCTION_TYPE, 813 LAST_TYPE = JS_FUNCTION_TYPE,
792 FIRST_NAME_TYPE = FIRST_TYPE, 814 FIRST_NAME_TYPE = FIRST_TYPE,
793 LAST_NAME_TYPE = SYMBOL_TYPE, 815 LAST_NAME_TYPE = SYMBOL_TYPE,
794 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE, 816 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE,
795 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE, 817 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE,
796 FIRST_NONSTRING_TYPE = SYMBOL_TYPE, 818 FIRST_NONSTRING_TYPE = SYMBOL_TYPE,
797 // Boundaries for testing for an external array. 819 // Boundaries for testing for an external array.
798 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE, 820 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE,
799 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE, 821 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE,
822 // Boundaries for testing for a fixed typed array.
823 FIRST_FIXED_TYPED_ARRAY_TYPE = FIXED_INT8_ARRAY_TYPE,
824 LAST_FIXED_TYPED_ARRAY_TYPE = FIXED_UINT8_CLAMPED_ARRAY_TYPE,
800 // Boundary for promotion to old data space/old pointer space. 825 // Boundary for promotion to old data space/old pointer space.
801 LAST_DATA_TYPE = FILLER_TYPE, 826 LAST_DATA_TYPE = FILLER_TYPE,
802 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy). 827 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy).
803 // Note that there is no range for JSObject or JSProxy, since their subtypes 828 // Note that there is no range for JSObject or JSProxy, since their subtypes
804 // are not continuous in this enum! The enum ranges instead reflect the 829 // are not continuous in this enum! The enum ranges instead reflect the
805 // external class names, where proxies are treated as either ordinary objects, 830 // external class names, where proxies are treated as either ordinary objects,
806 // or functions. 831 // or functions.
807 FIRST_JS_RECEIVER_TYPE = JS_FUNCTION_PROXY_TYPE, 832 FIRST_JS_RECEIVER_TYPE = JS_FUNCTION_PROXY_TYPE,
808 LAST_JS_RECEIVER_TYPE = LAST_TYPE, 833 LAST_JS_RECEIVER_TYPE = LAST_TYPE,
809 // Boundaries for testing the types represented as JSObject 834 // Boundaries for testing the types represented as JSObject
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 V(ExternalArray) \ 1004 V(ExternalArray) \
980 V(ExternalByteArray) \ 1005 V(ExternalByteArray) \
981 V(ExternalUnsignedByteArray) \ 1006 V(ExternalUnsignedByteArray) \
982 V(ExternalShortArray) \ 1007 V(ExternalShortArray) \
983 V(ExternalUnsignedShortArray) \ 1008 V(ExternalUnsignedShortArray) \
984 V(ExternalIntArray) \ 1009 V(ExternalIntArray) \
985 V(ExternalUnsignedIntArray) \ 1010 V(ExternalUnsignedIntArray) \
986 V(ExternalFloatArray) \ 1011 V(ExternalFloatArray) \
987 V(ExternalDoubleArray) \ 1012 V(ExternalDoubleArray) \
988 V(ExternalPixelArray) \ 1013 V(ExternalPixelArray) \
1014 V(FixedTypedArrayBase) \
1015 V(FixedUint8Array) \
1016 V(FixedInt8Array) \
1017 V(FixedUint16Array) \
1018 V(FixedInt16Array) \
1019 V(FixedUint32Array) \
1020 V(FixedInt32Array) \
1021 V(FixedFloat32Array) \
1022 V(FixedFloat64Array) \
1023 V(FixedUint8ClampedArray) \
989 V(ByteArray) \ 1024 V(ByteArray) \
990 V(FreeSpace) \ 1025 V(FreeSpace) \
991 V(JSReceiver) \ 1026 V(JSReceiver) \
992 V(JSObject) \ 1027 V(JSObject) \
993 V(JSContextExtensionObject) \ 1028 V(JSContextExtensionObject) \
994 V(JSGeneratorObject) \ 1029 V(JSGeneratorObject) \
995 V(JSModule) \ 1030 V(JSModule) \
996 V(Map) \ 1031 V(Map) \
997 V(DescriptorArray) \ 1032 V(DescriptorArray) \
998 V(TransitionArray) \ 1033 V(TransitionArray) \
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 // Returns true if an object has any of the fast elements kinds. 2131 // Returns true if an object has any of the fast elements kinds.
2097 inline bool HasFastElements(); 2132 inline bool HasFastElements();
2098 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS 2133 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS
2099 // ElementsKind. 2134 // ElementsKind.
2100 inline bool HasFastDoubleElements(); 2135 inline bool HasFastDoubleElements();
2101 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS 2136 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS
2102 // ElementsKind. 2137 // ElementsKind.
2103 inline bool HasFastHoleyElements(); 2138 inline bool HasFastHoleyElements();
2104 inline bool HasNonStrictArgumentsElements(); 2139 inline bool HasNonStrictArgumentsElements();
2105 inline bool HasDictionaryElements(); 2140 inline bool HasDictionaryElements();
2141
2106 inline bool HasExternalPixelElements(); 2142 inline bool HasExternalPixelElements();
2107 inline bool HasExternalArrayElements(); 2143 inline bool HasExternalArrayElements();
2108 inline bool HasExternalByteElements(); 2144 inline bool HasExternalByteElements();
2109 inline bool HasExternalUnsignedByteElements(); 2145 inline bool HasExternalUnsignedByteElements();
2110 inline bool HasExternalShortElements(); 2146 inline bool HasExternalShortElements();
2111 inline bool HasExternalUnsignedShortElements(); 2147 inline bool HasExternalUnsignedShortElements();
2112 inline bool HasExternalIntElements(); 2148 inline bool HasExternalIntElements();
2113 inline bool HasExternalUnsignedIntElements(); 2149 inline bool HasExternalUnsignedIntElements();
2114 inline bool HasExternalFloatElements(); 2150 inline bool HasExternalFloatElements();
2115 inline bool HasExternalDoubleElements(); 2151 inline bool HasExternalDoubleElements();
2152
2153 inline bool HasFixedTypedArrayElements();
2154
2116 bool HasFastArgumentsElements(); 2155 bool HasFastArgumentsElements();
2117 bool HasDictionaryArgumentsElements(); 2156 bool HasDictionaryArgumentsElements();
2118 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. 2157 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements.
2119 2158
2120 inline void set_map_and_elements( 2159 inline void set_map_and_elements(
2121 Map* map, 2160 Map* map,
2122 FixedArrayBase* value, 2161 FixedArrayBase* value,
2123 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 2162 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
2124 2163
2125 // Requires: HasFastElements(). 2164 // Requires: HasFastElements().
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
4810 4849
4811 // Dispatched behavior. 4850 // Dispatched behavior.
4812 DECLARE_PRINTER(ExternalDoubleArray) 4851 DECLARE_PRINTER(ExternalDoubleArray)
4813 DECLARE_VERIFIER(ExternalDoubleArray) 4852 DECLARE_VERIFIER(ExternalDoubleArray)
4814 4853
4815 private: 4854 private:
4816 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalDoubleArray); 4855 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalDoubleArray);
4817 }; 4856 };
4818 4857
4819 4858
4859 class FixedTypedArrayBase: public FixedArrayBase {
4860 public:
4861 // Casting:
4862 static inline FixedTypedArrayBase* cast(Object* obj);
4863
4864 static const int kDataOffset = kHeaderSize;
4865
4866 inline int size();
4867
4868 private:
4869 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArrayBase);
4870 };
4871
4872
4873 template <class Traits>
4874 class FixedTypedArray: public FixedTypedArrayBase {
4875 public:
4876 typedef typename Traits::ElementType ElementType;
4877 static const InstanceType kInstanceType = Traits::kInstanceType;
4878
4879 // Casting:
4880 static inline FixedTypedArray<Traits>* cast(Object* obj);
4881
4882 static inline int SizeFor(int length) {
4883 return kDataOffset + length * sizeof(ElementType);
4884 }
4885
4886 inline ElementType get_scalar(int index);
4887 MUST_USE_RESULT inline MaybeObject* get(int index);
4888 inline void set(int index, ElementType value);
4889
4890 // This accessor applies the correct conversion from Smi, HeapNumber
4891 // and undefined.
4892 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4893
4894 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array,
4895 uint32_t index,
4896 Handle<Object> value);
4897
4898 DECLARE_PRINTER(FixedTypedArray)
4899 DECLARE_VERIFIER(FixedTypedArray)
4900
4901 private:
4902 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray);
4903 };
4904
4905
4906 class Uint8ArrayTraits {
4907 public:
4908 typedef uint8_t ElementType;
4909 static const InstanceType kInstanceType = FIXED_UINT8_ARRAY_TYPE;
4910 static const char* Designator() { return "uint8 array"; }
4911 static inline MaybeObject* ToObject(Heap* heap, uint8_t scalar);
4912 static uint8_t defaultValue() { return 0; }
4913 };
4914
Toon Verwaest 2013/12/23 10:40:32 Double newlines between classes. This is a lot of
Dmitry Lomov (no reviews) 2014/01/07 15:48:43 Done.
4915 typedef FixedTypedArray<Uint8ArrayTraits> FixedUint8Array;
4916
4917 class Int8ArrayTraits {
4918 public:
4919 typedef int8_t ElementType;
4920 static const InstanceType kInstanceType = FIXED_INT8_ARRAY_TYPE;
4921 static const char* Designator() { return "int8 array"; }
4922 static inline MaybeObject* ToObject(Heap* heap, int8_t scalar);
4923 static int8_t defaultValue() { return 0; }
4924 };
4925
4926 typedef FixedTypedArray<Int8ArrayTraits> FixedInt8Array;
4927
4928 class Uint16ArrayTraits {
4929 public:
4930 typedef uint16_t ElementType;
4931 static const InstanceType kInstanceType = FIXED_UINT16_ARRAY_TYPE;
4932 static const char* Designator() { return "uint16 array"; }
4933 static inline MaybeObject* ToObject(Heap* heap, uint16_t scalar);
4934 static uint16_t defaultValue() { return 0; }
4935 };
4936
4937 typedef FixedTypedArray<Uint16ArrayTraits> FixedUint16Array;
4938
4939 class Int16ArrayTraits {
4940 public:
4941 typedef int16_t ElementType;
4942 static const InstanceType kInstanceType = FIXED_INT16_ARRAY_TYPE;
4943 static const char* Designator() { return "int16 array"; }
4944 static inline MaybeObject* ToObject(Heap* heap, int16_t scalar);
4945 static int16_t defaultValue() { return 0; }
4946 };
4947
4948 typedef FixedTypedArray<Int16ArrayTraits> FixedInt16Array;
4949
4950 class Uint32ArrayTraits {
4951 public:
4952 typedef uint32_t ElementType;
4953 static const InstanceType kInstanceType = FIXED_UINT32_ARRAY_TYPE;
4954 static const char* Designator() { return "uint32 array"; }
4955 static inline MaybeObject* ToObject(Heap* heap, uint32_t scalar);
4956 static uint32_t defaultValue() { return 0; }
4957 };
4958
4959 typedef FixedTypedArray<Uint32ArrayTraits> FixedUint32Array;
4960
4961 class Int32ArrayTraits {
4962 public:
4963 typedef int32_t ElementType;
4964 static const InstanceType kInstanceType = FIXED_INT32_ARRAY_TYPE;
4965 static const char* Designator() { return "int32 array"; }
4966 static inline MaybeObject* ToObject(Heap* heap, int32_t scalar);
4967 static int32_t defaultValue() { return 0; }
4968 };
4969
4970 typedef FixedTypedArray<Int32ArrayTraits> FixedInt32Array;
4971
4972 class Float32ArrayTraits {
4973 public:
4974 typedef float ElementType;
4975 static const InstanceType kInstanceType = FIXED_FLOAT32_ARRAY_TYPE;
4976 static const char* Designator() { return "float32 array"; }
4977 static inline MaybeObject* ToObject(Heap* heap, float scalar);
4978 static float defaultValue() { return 0; }
4979 };
4980
4981 typedef FixedTypedArray<Float32ArrayTraits> FixedFloat32Array;
4982
4983 class Float64ArrayTraits {
4984 public:
4985 typedef double ElementType;
4986 static const InstanceType kInstanceType = FIXED_FLOAT64_ARRAY_TYPE;
4987 static const char* Designator() { return "float64 array"; }
4988 static inline MaybeObject* ToObject(Heap* heap, double scalar);
4989 static double defaultValue() { return 0; }
4990 };
4991
4992 typedef FixedTypedArray<Float64ArrayTraits> FixedFloat64Array;
4993
4994 class Uint8ClampedArrayTraits {
4995 public:
4996 typedef uint8_t ElementType;
4997 static const InstanceType kInstanceType = FIXED_UINT8_CLAMPED_ARRAY_TYPE;
4998 static const char* Designator() { return "uint8 array"; }
4999 static inline MaybeObject* ToObject(Heap* heap, uint8_t scalar);
5000 static uint8_t defaultValue() { return 0; }
5001 };
5002
5003 typedef FixedTypedArray<Uint8ClampedArrayTraits> FixedUint8ClampedArray;
5004
4820 // DeoptimizationInputData is a fixed array used to hold the deoptimization 5005 // DeoptimizationInputData is a fixed array used to hold the deoptimization
4821 // data for code generated by the Hydrogen/Lithium compiler. It also 5006 // data for code generated by the Hydrogen/Lithium compiler. It also
4822 // contains information about functions that were inlined. If N different 5007 // contains information about functions that were inlined. If N different
4823 // functions were inlined then first N elements of the literal array will 5008 // functions were inlined then first N elements of the literal array will
4824 // contain these functions. 5009 // contain these functions.
4825 // 5010 //
4826 // It can be empty. 5011 // It can be empty.
4827 class DeoptimizationInputData: public FixedArray { 5012 class DeoptimizationInputData: public FixedArray {
4828 public: 5013 public:
4829 // Layout description. Indices in the array. 5014 // Layout description. Indices in the array.
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
5806 } 5991 }
5807 5992
5808 inline bool has_non_strict_arguments_elements() { 5993 inline bool has_non_strict_arguments_elements() {
5809 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; 5994 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
5810 } 5995 }
5811 5996
5812 inline bool has_external_array_elements() { 5997 inline bool has_external_array_elements() {
5813 return IsExternalArrayElementsKind(elements_kind()); 5998 return IsExternalArrayElementsKind(elements_kind());
5814 } 5999 }
5815 6000
6001 inline bool has_fixed_typed_array_elements() {
6002 return IsFixedTypedArrayElementsKind(elements_kind());
6003 }
6004
5816 inline bool has_dictionary_elements() { 6005 inline bool has_dictionary_elements() {
5817 return IsDictionaryElementsKind(elements_kind()); 6006 return IsDictionaryElementsKind(elements_kind());
5818 } 6007 }
5819 6008
5820 inline bool has_slow_elements_kind() { 6009 inline bool has_slow_elements_kind() {
5821 return elements_kind() == DICTIONARY_ELEMENTS 6010 return elements_kind() == DICTIONARY_ELEMENTS
5822 || elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; 6011 || elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
5823 } 6012 }
5824 6013
5825 static bool IsValidElementsTransition(ElementsKind from_kind, 6014 static bool IsValidElementsTransition(ElementsKind from_kind,
(...skipping 4791 matching lines...) Expand 10 before | Expand all | Expand 10 after
10617 } else { 10806 } else {
10618 value &= ~(1 << bit_position); 10807 value &= ~(1 << bit_position);
10619 } 10808 }
10620 return value; 10809 return value;
10621 } 10810 }
10622 }; 10811 };
10623 10812
10624 } } // namespace v8::internal 10813 } } // namespace v8::internal
10625 10814
10626 #endif // V8_OBJECTS_H_ 10815 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698