| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 7b06b8732ad03928d97d3dfcf16483b7633a39c5..fc0e30c67f11773479704a3315763fc20d7b1622 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -9642,8 +9642,16 @@ Context* JSFunction::NativeContextFromLiterals(FixedArray* literals) {
|
|
|
| bool JSFunction::PassesHydrogenFilter() {
|
| String* name = shared()->DebugName();
|
| - if (*FLAG_hydrogen_filter != '\0') {
|
| + // The filter string is a pattern that matches functions in this way:
|
| + // "*" all; the default
|
| + // "-" all but the top-level function
|
| + // "-name" all but the function "name"
|
| + // "" only the top-level function
|
| + // "name" only the function "name"
|
| + // "name*" only functions starting with "name"
|
| + if (*FLAG_hydrogen_filter != '*') {
|
| Vector<const char> filter = CStrVector(FLAG_hydrogen_filter);
|
| + if (filter.length() == 0) return name->length() == 0;
|
| if (filter[0] != '-' && name->IsUtf8EqualTo(filter)) return true;
|
| if (filter[0] == '-' &&
|
| !name->IsUtf8EqualTo(filter.SubVector(1, filter.length()))) {
|
|
|