• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2018 the V8 project authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6v8_root=$(readlink -f $(dirname $BASH_SOURCE)/../)
7symbols=$(
8    grep \
9        --only-matching \
10        --perl-regexp 'V\(_, \K([^,\)]*)' \
11        -- "$v8_root/src/heap-symbols.h")
12
13# Find symbols which appear exactly once (in heap-symbols.h)
14grep \
15    --only-matching \
16    --no-filename \
17    --recursive \
18    --fixed-strings "$symbols" \
19    -- "$v8_root/src" "$v8_root/test/cctest" \
20| sort \
21| uniq -u \
22| sed -e 's/.*/Heap symbol "&" seems to be unused./'
23
24echo "Kthxbye."
25