• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2015 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)/../)
7bailouts=$(
8    grep \
9        --only-matching \
10        --perl-regexp 'V\(\K(k[^,]*)' \
11        -- "$v8_root/src/bailout-reason.h")
12
13# Find bailouts which appear exactly once (in bailout-reason.h)
14grep \
15    --only-matching \
16    --no-filename \
17    --recursive \
18    --word-regexp \
19    --fixed-strings "$bailouts" \
20    -- "$v8_root/src" "$v8_root/test/cctest" \
21| sort \
22| uniq -u \
23| sed -e 's/.*/Bailout reason "&" seems to be unused./'
24
25echo "Kthxbye."
26