Revision: 15729
Author: [email protected]
Date: Wed Jul 17 09:21:03 2013
Log: Add support for empty hydrogen filter that matches only the
top-level JSFunction.
BUG=
Review URL: https://codereview.chromium.org/19590002
http://code.google.com/p/v8/source/detail?r=15729
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Wed Jul 17 05:19:40 2013
+++ /branches/bleeding_edge/src/flag-definitions.h Wed Jul 17 09:21:03 2013
@@ -212,7 +212,7 @@
// Flags for Crankshaft.
DEFINE_bool(crankshaft, true, "use crankshaft")
-DEFINE_string(hydrogen_filter, "", "optimization filter")
+DEFINE_string(hydrogen_filter, "*", "optimization filter")
DEFINE_bool(use_range, true, "use hydrogen range analysis")
DEFINE_bool(use_gvn, true, "use hydrogen global value numbering")
DEFINE_bool(use_canonicalizing, true, "use hydrogen instruction
canonicalizing")
=======================================
--- /branches/bleeding_edge/src/objects.cc Wed Jul 17 04:50:24 2013
+++ /branches/bleeding_edge/src/objects.cc Wed Jul 17 09:21:03 2013
@@ -9646,8 +9646,16 @@
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()))) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.