Commit 6c2233fb authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix --hydrogen-filter="-".

SubVector asserts that the vector length is not 0 and fails.

R=bmeurer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/43873002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent acb06df0
...@@ -9912,9 +9912,13 @@ bool JSFunction::PassesFilter(const char* raw_filter) { ...@@ -9912,9 +9912,13 @@ bool JSFunction::PassesFilter(const char* raw_filter) {
String* name = shared()->DebugName(); String* name = shared()->DebugName();
Vector<const char> filter = CStrVector(raw_filter); Vector<const char> filter = CStrVector(raw_filter);
if (filter.length() == 0) return name->length() == 0; if (filter.length() == 0) return name->length() == 0;
if (filter[0] != '-' && name->IsUtf8EqualTo(filter)) return true; if (filter[0] == '-') {
if (filter[0] == '-' && if (filter.length() == 1) {
!name->IsUtf8EqualTo(filter.SubVector(1, filter.length()))) { return (name->length() != 0);
} else if (!name->IsUtf8EqualTo(filter.SubVector(1, filter.length()))) {
return true;
}
} else if (name->IsUtf8EqualTo(filter)) {
return true; return true;
} }
if (filter[filter.length() - 1] == '*' && if (filter[filter.length() - 1] == '*' &&
......
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