WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65413
Introduce SpecifierSorter, a thing that knows how specifiers should be ordered.
https://bugs.webkit.org/show_bug.cgi?id=65413
Summary
Introduce SpecifierSorter, a thing that knows how specifiers should be ordered.
Dimitri Glazkov (Google)
Reported
2011-07-30 11:18:25 PDT
Introduce SpecifierSorter, a thing that knows how specifiers should be ordered.
Attachments
WIP:Switching computers.
(6.19 KB, patch)
2011-07-30 11:19 PDT
,
Dimitri Glazkov (Google)
no flags
Details
Formatted Diff
Diff
Patch
(11.24 KB, patch)
2011-07-30 14:55 PDT
,
Dimitri Glazkov (Google)
abarth
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Dimitri Glazkov (Google)
Comment 1
2011-07-30 11:19:11 PDT
Created
attachment 102438
[details]
WIP:Switching computers.
Dimitri Glazkov (Google)
Comment 2
2011-07-30 14:55:33 PDT
Created
attachment 102440
[details]
Patch
Adam Barth
Comment 3
2011-07-31 22:03:41 PDT
Comment on
attachment 102440
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=102440&action=review
> Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:84 > + def add_specifier(self, category, specifier): > + self._specifier_to_category[specifier] = category
Should this be private?
> Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:99 > + category_slots = [] > + for i in range(len(TestConfiguration.category_order())): > + category_slots.append([])
category_slots = [[]] * len(TestConfiguration.category_order()) or category_slots = map(lambda x: [], TestConfiguration.category_order())
Dimitri Glazkov (Google)
Comment 4
2011-08-01 10:53:09 PDT
(In reply to
comment #3
)
> (From update of
attachment 102440
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=102440&action=review
> > > Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:84 > > + def add_specifier(self, category, specifier): > > + self._specifier_to_category[specifier] = category > > Should this be private? > > > Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:99 > > + category_slots = [] > > + for i in range(len(TestConfiguration.category_order())): > > + category_slots.append([]) > > category_slots = [[]] * len(TestConfiguration.category_order())
This will give you a somewhat unexpected effect of having one array listed N times:
>>> a = ([[]] * 10) >>> a[0].append('zoot') >>> a
[['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot']]
> > or > > category_slots = map(lambda x: [], TestConfiguration.category_order())
Now, _that_ is cool. (In reply to
comment #3
)
> (From update of
attachment 102440
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=102440&action=review
> > > Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:84 > > + def add_specifier(self, category, specifier): > > + self._specifier_to_category[specifier] = category > > Should this be private? > > > Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:99 > > + category_slots = [] > > + for i in range(len(TestConfiguration.category_order())): > > + category_slots.append([]) > > category_slots = [[]] * len(TestConfiguration.category_order()) > > or > > category_slots = map(lambda x: [], TestConfiguration.category_order())
Dimitri Glazkov (Google)
Comment 5
2011-08-01 11:34:29 PDT
(In reply to
comment #3
)
> (From update of
attachment 102440
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=102440&action=review
> > > Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:84 > > + def add_specifier(self, category, specifier): > > + self._specifier_to_category[specifier] = category > > Should this be private?
No, I use it to populate the specifier in TestConfigurationConverter.
Adam Barth
Comment 6
2011-08-01 12:18:38 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > (From update of
attachment 102440
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=102440&action=review
> > > > > Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py:99 > > > + category_slots = [] > > > + for i in range(len(TestConfiguration.category_order())): > > > + category_slots.append([]) > > > > category_slots = [[]] * len(TestConfiguration.category_order()) > > This will give you a somewhat unexpected effect of having one array listed N times: > > >>> a = ([[]] * 10) > >>> a[0].append('zoot') > >>> a > [['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot'], ['zoot']]
Doh!
Dimitri Glazkov (Google)
Comment 7
2011-08-01 12:55:53 PDT
Committed
r92136
: <
http://trac.webkit.org/changeset/92136
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug