2018-01-15 15:24:18 +00:00
|
|
|
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
// Categories for instance types.
|
|
|
|
const CATEGORIES = new Map([
|
|
|
|
[
|
|
|
|
'user', new Set([
|
|
|
|
'CONS_ONE_BYTE_STRING_TYPE',
|
|
|
|
'CONS_STRING_TYPE',
|
|
|
|
'DESCRIPTOR_ARRAY_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'ELEMENTS_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'EXTERNAL_INTERNALIZED_STRING_TYPE',
|
|
|
|
'EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
|
|
|
|
'EXTERNAL_ONE_BYTE_STRING_TYPE',
|
|
|
|
'EXTERNAL_STRING_TYPE',
|
|
|
|
'EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE',
|
2018-03-02 10:51:03 +00:00
|
|
|
'FIXED_BIGINT64_ARRAY_TYPE',
|
|
|
|
'FIXED_BIGUINT64_ARRAY_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'FIXED_DOUBLE_ARRAY_TYPE',
|
|
|
|
'FIXED_FLOAT32_ARRAY_TYPE',
|
|
|
|
'FIXED_FLOAT64_ARRAY_TYPE',
|
|
|
|
'FIXED_INT16_ARRAY_TYPE',
|
|
|
|
'FIXED_INT32_ARRAY_TYPE',
|
|
|
|
'FIXED_INT8_ARRAY_TYPE',
|
|
|
|
'FIXED_UINT16_ARRAY_TYPE',
|
|
|
|
'FIXED_UINT32_ARRAY_TYPE',
|
|
|
|
'FIXED_UINT8_ARRAY_TYPE',
|
|
|
|
'FIXED_UINT8_CLAMPED_ARRAY_TYPE',
|
2018-01-22 18:22:47 +00:00
|
|
|
'FUNCTION_CONTEXT_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'GLOBAL_ELEMENTS_TYPE',
|
|
|
|
'GLOBAL_PROPERTIES_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'HEAP_NUMBER_TYPE',
|
|
|
|
'INTERNALIZED_STRING_TYPE',
|
|
|
|
'JS_ARGUMENTS_TYPE',
|
|
|
|
'JS_ARRAY_BUFFER_TYPE',
|
2019-01-10 17:05:02 +00:00
|
|
|
'JS_ARRAY_ITERATOR_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_ARRAY_TYPE',
|
|
|
|
'JS_BOUND_FUNCTION_TYPE',
|
|
|
|
'JS_DATE_TYPE',
|
|
|
|
'JS_ERROR_TYPE',
|
|
|
|
'JS_FAST_ARRAY_KEY_ITERATOR_TYPE',
|
|
|
|
'JS_FAST_ARRAY_VALUE_ITERATOR_TYPE',
|
|
|
|
'JS_FAST_HOLEY_ARRAY_VALUE_ITERATOR_TYPE',
|
|
|
|
'JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE',
|
|
|
|
'JS_FAST_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE',
|
|
|
|
'JS_FAST_SMI_ARRAY_VALUE_ITERATOR_TYPE',
|
|
|
|
'JS_FUNCTION_TYPE',
|
2018-01-16 15:38:56 +00:00
|
|
|
'JS_GENERATOR_OBJECT_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE',
|
|
|
|
'JS_GLOBAL_OBJECT_TYPE',
|
|
|
|
'JS_GLOBAL_PROXY_TYPE',
|
2019-01-08 19:10:35 +00:00
|
|
|
'JS_INTL_COLLATOR_TYPE',
|
|
|
|
'JS_INTL_DATE_TIME_FORMAT_TYPE',
|
|
|
|
'JS_INTL_LIST_FORMAT_TYPE',
|
|
|
|
'JS_INTL_LOCALE_TYPE',
|
|
|
|
'JS_INTL_NUMBER_FORMAT_TYPE',
|
|
|
|
'JS_INTL_PLURAL_RULES_TYPE',
|
|
|
|
'JS_INTL_RELATIVE_TIME_FORMAT_TYPE',
|
|
|
|
'JS_INTL_SEGMENT_ITERATOR_TYPE',
|
|
|
|
'JS_INTL_SEGMENTER_TYPE',
|
|
|
|
'JS_INTL_V8_BREAK_ITERATOR_TYPE',
|
2019-01-10 17:05:02 +00:00
|
|
|
'JS_MAP_KEY_ITERATOR_TYPE',
|
2018-01-16 15:38:56 +00:00
|
|
|
'JS_MAP_KEY_VALUE_ITERATOR_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_MAP_TYPE',
|
2018-03-02 10:51:03 +00:00
|
|
|
'JS_MAP_VALUE_ITERATOR_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_MESSAGE_OBJECT_TYPE',
|
|
|
|
'JS_OBJECT_TYPE',
|
2019-06-24 13:13:34 +00:00
|
|
|
'JS_PRIMITIVE_WRAPPER_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_PROMISE_TYPE',
|
2019-01-10 17:05:02 +00:00
|
|
|
'JS_PROXY_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_REGEXP_TYPE',
|
2019-01-10 17:05:02 +00:00
|
|
|
'JS_SET_KEY_VALUE_ITERATOR_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_SET_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'JS_SET_VALUE_ITERATOR_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_STRING_ITERATOR_TYPE',
|
2018-01-31 08:01:52 +00:00
|
|
|
'JS_TO_WASM_FUNCTION',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_TYPED_ARRAY_TYPE',
|
|
|
|
'JS_WEAK_MAP_TYPE',
|
2019-08-20 13:24:13 +00:00
|
|
|
'HEAP_NUMBER_TYPE',
|
2018-01-22 18:22:47 +00:00
|
|
|
'NATIVE_CONTEXT_TYPE',
|
2018-03-02 10:51:03 +00:00
|
|
|
'OBJECT_PROPERTY_DICTIONARY_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'ONE_BYTE_INTERNALIZED_STRING_TYPE',
|
|
|
|
'ONE_BYTE_STRING_TYPE',
|
2018-03-02 10:51:03 +00:00
|
|
|
'OTHER_CONTEXT_TYPE',
|
2018-01-23 18:45:06 +00:00
|
|
|
'PROPERTY_ARRAY_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'SLICED_ONE_BYTE_STRING_TYPE',
|
|
|
|
'SLICED_STRING_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'STRING_EXTERNAL_RESOURCE_ONE_BYTE_TYPE',
|
|
|
|
'STRING_EXTERNAL_RESOURCE_TWO_BYTE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'STRING_TYPE',
|
|
|
|
'SYMBOL_TYPE',
|
|
|
|
'THIN_ONE_BYTE_STRING_TYPE',
|
|
|
|
'THIN_STRING_TYPE',
|
2019-01-10 17:05:02 +00:00
|
|
|
'UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE',
|
|
|
|
'UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
|
|
|
|
'UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE',
|
|
|
|
'UNCACHED_EXTERNAL_STRING_TYPE',
|
2018-01-31 08:01:52 +00:00
|
|
|
'WASM_INSTANCE_TYPE',
|
|
|
|
'WASM_MEMORY_TYPE',
|
|
|
|
'WASM_MODULE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'system', new Set([
|
2018-01-15 18:09:24 +00:00
|
|
|
'ACCESS_CHECK_INFO_TYPE',
|
|
|
|
'ACCESSOR_INFO_TYPE',
|
|
|
|
'ACCESSOR_PAIR_TYPE',
|
|
|
|
'ALLOCATION_MEMENTO_TYPE',
|
|
|
|
'ALLOCATION_SITE_TYPE',
|
2018-07-05 18:34:09 +00:00
|
|
|
'ARRAY_BOILERPLATE_DESCRIPTION_TYPE',
|
|
|
|
'ARRAY_BOILERPLATE_DESCRIPTION_ELEMENTS_TYPE',
|
2018-01-15 18:09:24 +00:00
|
|
|
'BOILERPLATE_ELEMENTS_TYPE',
|
|
|
|
'BOILERPLATE_PROPERTY_ARRAY_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'BOILERPLATE_PROPERTY_DICTIONARY_TYPE',
|
2018-01-15 18:09:24 +00:00
|
|
|
'BYTE_ARRAY_TYPE',
|
2018-04-02 23:21:30 +00:00
|
|
|
'CALL_HANDLER_INFO_TYPE',
|
2018-01-15 18:09:24 +00:00
|
|
|
'CELL_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'CODE_STUBS_TABLE_TYPE',
|
2018-01-15 18:09:24 +00:00
|
|
|
'CONTEXT_EXTENSION_TYPE',
|
2018-01-18 17:12:00 +00:00
|
|
|
'ENUM_CACHE_TYPE',
|
|
|
|
'ENUM_INDICES_CACHE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'FOREIGN_TYPE',
|
2018-01-31 08:01:52 +00:00
|
|
|
'FUNCTION_TEMPLATE_INFO_ENTRIES_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'FUNCTION_TEMPLATE_INFO_TYPE',
|
|
|
|
'INTERCEPTOR_INFO_TYPE',
|
|
|
|
'JS_API_OBJECT_TYPE',
|
2018-01-15 18:09:24 +00:00
|
|
|
'JS_ARRAY_BOILERPLATE_TYPE',
|
2018-01-15 20:27:40 +00:00
|
|
|
'JS_OBJECT_BOILERPLATE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'JS_SPECIAL_API_OBJECT_TYPE',
|
|
|
|
'MAP_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'NUMBER_STRING_CACHE_TYPE',
|
2018-07-05 18:34:09 +00:00
|
|
|
'OBJECT_BOILERPLATE_DESCRIPTION_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'OBJECT_TEMPLATE_INFO_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'OBJECT_TO_CODE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'ODDBALL_TYPE',
|
|
|
|
'PROMISE_REACTION_JOB_INFO_TYPE',
|
|
|
|
'PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE',
|
|
|
|
'PROPERTY_CELL_TYPE',
|
|
|
|
'PROTOTYPE_INFO_TYPE',
|
2018-01-18 17:12:00 +00:00
|
|
|
'PROTOTYPE_USERS_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'REGEXP_MULTIPLE_CACHE_TYPE',
|
|
|
|
'RETAINED_MAPS_TYPE',
|
2018-01-22 18:22:47 +00:00
|
|
|
'SCOPE_INFO_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'SCRIPT_LIST_TYPE',
|
2018-01-23 18:45:06 +00:00
|
|
|
'SCRIPT_SHARED_FUNCTION_INFOS_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'SERIALIZED_OBJECTS_TYPE',
|
|
|
|
'SINGLE_CHARACTER_STRING_CACHE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'STACK_FRAME_INFO_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'STRING_SPLIT_CACHE_TYPE',
|
|
|
|
'STRING_TABLE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'TRANSITION_ARRAY_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'WEAK_NEW_SPACE_OBJECT_TO_CODE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
])
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'code', new Set([
|
2018-01-18 17:12:00 +00:00
|
|
|
'BUILTIN',
|
|
|
|
'BYTECODE_ARRAY_CONSTANT_POOL_TYPE',
|
|
|
|
'BYTECODE_ARRAY_HANDLER_TABLE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'BYTECODE_ARRAY_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'BYTECODE_HANDLER',
|
2018-01-15 15:24:18 +00:00
|
|
|
'CODE_DATA_CONTAINER_TYPE',
|
2018-01-24 12:12:55 +00:00
|
|
|
'DEOPTIMIZATION_DATA_TYPE',
|
|
|
|
'EMBEDDED_OBJECT_TYPE',
|
2018-03-02 10:51:03 +00:00
|
|
|
'FEEDBACK_CELL_TYPE',
|
2018-01-31 08:01:52 +00:00
|
|
|
'FEEDBACK_METADATA_TYPE',
|
2018-01-18 12:05:02 +00:00
|
|
|
'FEEDBACK_VECTOR_ENTRY_TYPE',
|
2018-03-02 10:51:03 +00:00
|
|
|
'FEEDBACK_VECTOR_HEADER_TYPE',
|
2018-02-02 13:48:01 +00:00
|
|
|
'FEEDBACK_VECTOR_SLOT_CALL_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_CALL_UNUSED_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_ENUM_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_LOAD_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_LOAD_UNUSED_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_OTHER_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_STORE_TYPE',
|
|
|
|
'FEEDBACK_VECTOR_SLOT_STORE_UNUSED_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'FEEDBACK_VECTOR_TYPE',
|
|
|
|
'LOAD_HANDLER_TYPE',
|
2018-01-22 15:04:24 +00:00
|
|
|
'NOSCRIPT_SHARED_FUNCTION_INFOS_TYPE',
|
2018-01-24 12:12:55 +00:00
|
|
|
'OPTIMIZED_CODE_LITERALS_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'OPTIMIZED_FUNCTION',
|
2019-01-10 17:05:02 +00:00
|
|
|
'PREPARSE_DATA_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'REGEXP',
|
2018-06-15 08:35:10 +00:00
|
|
|
'RELOC_INFO_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'SCRIPT_SOURCE_EXTERNAL_ONE_BYTE_TYPE',
|
|
|
|
'SCRIPT_SOURCE_EXTERNAL_TWO_BYTE_TYPE',
|
2018-02-02 15:35:07 +00:00
|
|
|
'SCRIPT_SOURCE_EXTERNAL_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'SCRIPT_SOURCE_NON_EXTERNAL_ONE_BYTE_TYPE',
|
|
|
|
'SCRIPT_SOURCE_NON_EXTERNAL_TWO_BYTE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'SCRIPT_TYPE',
|
|
|
|
'SHARED_FUNCTION_INFO_TYPE',
|
2018-06-15 08:35:10 +00:00
|
|
|
'SOURCE_POSITION_TABLE_TYPE',
|
2018-01-15 15:24:18 +00:00
|
|
|
'STORE_HANDLER_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'STUB',
|
2019-01-10 17:05:02 +00:00
|
|
|
'UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE',
|
|
|
|
'UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE',
|
2018-02-01 15:43:27 +00:00
|
|
|
'UNCOMPILED_JS_FUNCTION_TYPE',
|
2018-08-20 17:00:35 +00:00
|
|
|
'UNCOMPILED_SHARED_FUNCTION_INFO_TYPE'
|
2018-01-15 15:24:18 +00:00
|
|
|
])
|
|
|
|
],
|
|
|
|
['unclassified', new Set()],
|
|
|
|
]);
|
|
|
|
|
|
|
|
// Maps category to description text that is shown in html.
|
|
|
|
const CATEGORY_NAMES = new Map([
|
2018-01-15 17:58:02 +00:00
|
|
|
['user', 'JS'],
|
|
|
|
['system', 'Metadata'],
|
2018-01-15 15:24:18 +00:00
|
|
|
['code', 'Code'],
|
|
|
|
['unclassified', 'Unclassified'],
|
|
|
|
]);
|