21种v8的元素类型
enum ElementsKind { // The "fast" kind for elements that only contain SMI values. Must be first // to make it possible to efficiently check maps for this kind. FAST_SMI_ELEMENTS, FAST_HOLEY_SMI_ELEMENTS, // The "fast" kind for tagged values. Must be second to make it possible to // efficiently check maps for this and the FAST_SMI_ONLY_ELEMENTS kind // together at once. FAST_ELEMENTS, FAST_HOLEY_ELEMENTS, // The "fast" kind for unwrapped, non-tagged double values. FAST_DOUBLE_ELEMENTS, FAST_HOLEY_DOUBLE_ELEMENTS, // The "slow" kind. DICTIONARY_ELEMENTS, // Elements kind of the "arguments" object (only in sloppy mode). FAST_SLOPPY_ARGUMENTS_ELEMENTS, SLOW_SLOPPY_ARGUMENTS_ELEMENTS, // For string wrapper objects ("new String('...')"), the string's characters // are overlaid onto a regular elements backing store. FAST_STRING_WRAPPER_ELEMENTS, SLOW_STRING_WRAPPER_ELEMENTS, // Fixed typed arrays. UINT8_ELEMENTS, INT8_ELEMENTS, UINT16_ELEMENTS, INT16_ELEMENTS, UINT32_ELEMENTS, INT32_ELEMENTS, FLOAT32_ELEMENTS, FLOAT64_ELEMENTS, UINT8_CLAMPED_ELEMENTS, // Sentinel ElementsKind for objects with no elements. NO_ELEMENTS, // Derived constants from ElementsKind. FIRST_ELEMENTS_KIND = FAST_SMI_ELEMENTS, LAST_ELEMENTS_KIND = UINT8_CLAMPED_ELEMENTS, FIRST_FAST_ELEMENTS_KIND = FAST_SMI_ELEMENTS, LAST_FAST_ELEMENTS_KIND = FAST_HOLEY_DOUBLE_ELEMENTS, FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND = UINT8_ELEMENTS, LAST_FIXED_TYPED_ARRAY_ELEMENTS_KIND = UINT8_CLAMPED_ELEMENTS, TERMINAL_FAST_ELEMENTS_KIND = FAST_HOLEY_ELEMENTS };
Wednesday, September 27, 2017 by blast