blob: da4d4a7f4666d851ff8e448324361a9951071481 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001#!/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=$(grep -oP 'V\(\K(k[^,]*)' "$v8_root/src/bailout-reason.h")
8
9for bailout in $bailouts; do
10 bailout_uses=$(grep -r $bailout "$v8_root/src" "$v8_root/test/cctest" | wc -l)
11 if [ $bailout_uses -eq "1" ]; then
12 echo "Bailout reason \"$bailout\" seems to be unused."
13 fi
14done
15
16echo "Kthxbye."