Commit d540724b authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[cleanup] Remove unused heap-symbols and add tool.

R=clemensh@chromium.org
BUG=v8:8238

Change-Id: I03454ced41da35be9d389d843026ed5c0f7131fe
Reviewed-on: https://chromium-review.googlesource.com/c/1326465
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57366}
parent 82fce0fc
......@@ -40,7 +40,6 @@
V(_, list_string, "list") \
V(_, literal_string, "literal") \
V(_, locale_string, "locale") \
V(_, localeWithExtension_string, "localeWithExtension") \
V(_, loose_string, "loose") \
V(_, lower_string, "lower") \
V(_, maximumFractionDigits_string, "maximumFractionDigits") \
......@@ -117,8 +116,6 @@
V(_, call_string, "call") \
V(_, callee_string, "callee") \
V(_, caller_string, "caller") \
V(_, cell_value_string, "%cell_value") \
V(_, char_at_string, "CharAt") \
V(_, character_string, "character") \
V(_, closure_string, "(closure)") \
V(_, code_string, "code") \
......@@ -134,7 +131,6 @@
V(_, default_string, "default") \
V(_, defineProperty_string, "defineProperty") \
V(_, deleteProperty_string, "deleteProperty") \
V(_, did_handle_string, "didHandle") \
V(_, disjunction_string, "disjunction") \
V(_, display_name_string, "displayName") \
V(_, done_string, "done") \
......@@ -147,7 +143,6 @@
V(_, dot_string, ".") \
V(_, dot_switch_tag_string, ".switch_tag") \
V(_, dotAll_string, "dotAll") \
V(_, enqueue_string, "enqueue") \
V(_, entries_string, "entries") \
V(_, enumerable_string, "enumerable") \
V(_, element_string, "element") \
......@@ -186,8 +181,6 @@
V(_, Int8Array_string, "Int8Array") \
V(_, isExtensible_string, "isExtensible") \
V(_, isView_string, "isView") \
V(_, KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic") \
V(_, KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic") \
V(_, keys_string, "keys") \
V(_, lastIndex_string, "lastIndex") \
V(_, length_string, "length") \
......@@ -199,7 +192,6 @@
V(_, MapIterator_string, "Map Iterator") \
V(_, message_string, "message") \
V(_, minus_Infinity_string, "-Infinity") \
V(_, minus_zero_string, "-0") \
V(_, Module_string, "Module") \
V(_, multiline_string, "multiline") \
V(_, name_string, "name") \
......@@ -229,7 +221,6 @@
V(_, preventExtensions_string, "preventExtensions") \
V(_, Promise_string, "Promise") \
V(_, promise_string, "promise") \
V(_, PromiseResolveThenableJob_string, "PromiseResolveThenableJob") \
V(_, proto_string, "__proto__") \
V(_, prototype_string, "prototype") \
V(_, proxy_string, "proxy") \
......@@ -237,13 +228,11 @@
V(_, query_colon_string, "(?:)") \
V(_, RangeError_string, "RangeError") \
V(_, raw_string, "raw") \
V(_, ReconfigureToDataProperty_string, "ReconfigureToDataProperty") \
V(_, ReferenceError_string, "ReferenceError") \
V(_, ReflectGet_string, "Reflect.get") \
V(_, ReflectHas_string, "Reflect.has") \
V(_, RegExp_string, "RegExp") \
V(_, regexp_to_string, "[object RegExp]") \
V(_, reject_string, "reject") \
V(_, resolve_string, "resolve") \
V(_, return_string, "return") \
V(_, revoke_string, "revoke") \
......@@ -288,8 +277,6 @@
V(_, undefined_to_string, "[object Undefined]") \
V(_, unicode_string, "unicode") \
V(_, URIError_string, "URIError") \
V(_, use_asm_string, "use asm") \
V(_, use_strict_string, "use strict") \
V(_, value_string, "value") \
V(_, valueOf_string, "valueOf") \
V(_, values_string, "values") \
......@@ -299,7 +286,6 @@
V(_, WeakRef_string, "WeakRef") \
V(_, WeakSet_string, "WeakSet") \
V(_, week_string, "week") \
V(_, will_handle_string, "willHandle") \
V(_, word_string, "word") \
V(_, writable_string, "writable") \
V(_, zero_string, "0")
......@@ -325,11 +311,9 @@
V(_, nonextensible_symbol) \
V(_, not_mapped_symbol) \
V(_, premonomorphic_symbol) \
V(_, promise_async_stack_id_symbol) \
V(_, promise_debug_marker_symbol) \
V(_, promise_forwarding_handler_symbol) \
V(_, promise_handled_by_symbol) \
V(_, promise_async_id_symbol) \
V(_, sealed_symbol) \
V(_, stack_trace_symbol) \
V(_, strict_function_transition_symbol) \
......
#!/bin/bash
# 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.
v8_root=$(readlink -f $(dirname $BASH_SOURCE)/../)
symbols=$(
grep \
--only-matching \
--perl-regexp 'V\(_, \K([^,\)]*)' \
-- "$v8_root/src/heap-symbols.h")
# Find symbols which appear exactly once (in heap-symbols.h)
grep \
--only-matching \
--no-filename \
--recursive \
--fixed-strings "$symbols" \
-- "$v8_root/src" "$v8_root/test/cctest" \
| sort \
| uniq -u \
| sed -e 's/.*/Heap symbol "&" seems to be unused./'
echo "Kthxbye."
......@@ -298,42 +298,42 @@ KNOWN_MAPS = {
("RO_SPACE", 0x02699): (171, "Tuple2Map"),
("RO_SPACE", 0x02739): (173, "ArrayBoilerplateDescriptionMap"),
("RO_SPACE", 0x02a79): (161, "InterceptorInfoMap"),
("RO_SPACE", 0x05101): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x05151): (154, "AccessorInfoMap"),
("RO_SPACE", 0x051a1): (155, "AccessorPairMap"),
("RO_SPACE", 0x051f1): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x05241): (157, "AllocationMementoMap"),
("RO_SPACE", 0x05291): (158, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x052e1): (159, "DebugInfoMap"),
("RO_SPACE", 0x05331): (160, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x05381): (162, "InterpreterDataMap"),
("RO_SPACE", 0x053d1): (163, "ModuleInfoEntryMap"),
("RO_SPACE", 0x05421): (164, "ModuleMap"),
("RO_SPACE", 0x05471): (165, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x054c1): (166, "PromiseCapabilityMap"),
("RO_SPACE", 0x05511): (167, "PromiseReactionMap"),
("RO_SPACE", 0x05561): (168, "PrototypeInfoMap"),
("RO_SPACE", 0x055b1): (169, "ScriptMap"),
("RO_SPACE", 0x05601): (170, "StackFrameInfoMap"),
("RO_SPACE", 0x05651): (172, "Tuple3Map"),
("RO_SPACE", 0x056a1): (174, "WasmDebugInfoMap"),
("RO_SPACE", 0x056f1): (175, "WasmExportedFunctionDataMap"),
("RO_SPACE", 0x05741): (176, "CallableTaskMap"),
("RO_SPACE", 0x05791): (177, "CallbackTaskMap"),
("RO_SPACE", 0x057e1): (178, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x05831): (179, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x05881): (180, "PromiseResolveThenableJobTaskMap"),
("RO_SPACE", 0x058d1): (181, "WeakFactoryCleanupJobTaskMap"),
("RO_SPACE", 0x05921): (182, "MicrotaskQueueMap"),
("RO_SPACE", 0x05971): (183, "AllocationSiteWithWeakNextMap"),
("RO_SPACE", 0x059c1): (183, "AllocationSiteWithoutWeakNextMap"),
("RO_SPACE", 0x05a11): (215, "LoadHandler1Map"),
("RO_SPACE", 0x05a61): (215, "LoadHandler2Map"),
("RO_SPACE", 0x05ab1): (215, "LoadHandler3Map"),
("RO_SPACE", 0x05b01): (222, "StoreHandler0Map"),
("RO_SPACE", 0x05b51): (222, "StoreHandler1Map"),
("RO_SPACE", 0x05ba1): (222, "StoreHandler2Map"),
("RO_SPACE", 0x05bf1): (222, "StoreHandler3Map"),
("RO_SPACE", 0x04f01): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x04f51): (154, "AccessorInfoMap"),
("RO_SPACE", 0x04fa1): (155, "AccessorPairMap"),
("RO_SPACE", 0x04ff1): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x05041): (157, "AllocationMementoMap"),
("RO_SPACE", 0x05091): (158, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x050e1): (159, "DebugInfoMap"),
("RO_SPACE", 0x05131): (160, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x05181): (162, "InterpreterDataMap"),
("RO_SPACE", 0x051d1): (163, "ModuleInfoEntryMap"),
("RO_SPACE", 0x05221): (164, "ModuleMap"),
("RO_SPACE", 0x05271): (165, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x052c1): (166, "PromiseCapabilityMap"),
("RO_SPACE", 0x05311): (167, "PromiseReactionMap"),
("RO_SPACE", 0x05361): (168, "PrototypeInfoMap"),
("RO_SPACE", 0x053b1): (169, "ScriptMap"),
("RO_SPACE", 0x05401): (170, "StackFrameInfoMap"),
("RO_SPACE", 0x05451): (172, "Tuple3Map"),
("RO_SPACE", 0x054a1): (174, "WasmDebugInfoMap"),
("RO_SPACE", 0x054f1): (175, "WasmExportedFunctionDataMap"),
("RO_SPACE", 0x05541): (176, "CallableTaskMap"),
("RO_SPACE", 0x05591): (177, "CallbackTaskMap"),
("RO_SPACE", 0x055e1): (178, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x05631): (179, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x05681): (180, "PromiseResolveThenableJobTaskMap"),
("RO_SPACE", 0x056d1): (181, "WeakFactoryCleanupJobTaskMap"),
("RO_SPACE", 0x05721): (182, "MicrotaskQueueMap"),
("RO_SPACE", 0x05771): (183, "AllocationSiteWithWeakNextMap"),
("RO_SPACE", 0x057c1): (183, "AllocationSiteWithoutWeakNextMap"),
("RO_SPACE", 0x05811): (215, "LoadHandler1Map"),
("RO_SPACE", 0x05861): (215, "LoadHandler2Map"),
("RO_SPACE", 0x058b1): (215, "LoadHandler3Map"),
("RO_SPACE", 0x05901): (222, "StoreHandler0Map"),
("RO_SPACE", 0x05951): (222, "StoreHandler1Map"),
("RO_SPACE", 0x059a1): (222, "StoreHandler2Map"),
("RO_SPACE", 0x059f1): (222, "StoreHandler3Map"),
("MAP_SPACE", 0x00139): (1057, "ExternalMap"),
("MAP_SPACE", 0x00189): (1073, "JSMessageObjectMap"),
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment