| Age | Commit message (Collapse) | Author |
|
This is the only way it's used. Maybe it ought to be removed completely.
|
|
|
|
Minor bug due to an early return from load_config(). Piggyback a
refactoring of the code. Reading the header is unlikely to be
performance-sensitive.
Add a testcase too.
|
|
|
|
|
|
|
|
Just noticed that the C implementation does. Haven't run into it in the
wild.
For example, the assignment to B below is ignored:
CONFIG_A=y
CONFIG_B=y
|
|
Faster without sacrificing readability.
|
|
Each expression in the loop is relatively expensive at this point too.
|
|
|
|
|
|
All symbols get a 'dep', so it's pointless to do it afterwards.
|
|
|
|
For consistency.
|
|
Also fix a tokenizer nit: a '!' at the end of a line can be tokenized
(though it's meaningless).
|
|
Bit neater, and Python 3-friendly.
|
|
|
|
|
|
|
|
Semi-pointless in _parse_block(). Often not even used.
|
|
Also add named choices defined in multiple locations to the block at
each location. Not sure why I only added them at the first location
before, as symbols don't work that way.
I still doubt named choices defined in multiple locations will ever be
used.
|
|
Redundant.
|
|
Consistent with 'user_val'.
|
|
|
|
|
|
_Block turned simple enough that it became pointless.
|
|
The entire _Block class is probably up next.
|
|
The menu must be added to self.menus before parsing its contents, so
that it comes before any contained menus. Make the comment and menu
cases consistent by rearranging the comment case instead.
|
|
Ops... this breaks menu ordering.
|
|
|
|
|
|
|
|
Small tokenizer optimization, similar to the regex optimizations.
|
|
strip() instead of lstrip() makes the loop terminate earlier, saving
lots of calls. Shaves a few % of parsing the x86 Kconfigs.
|
|
Pre-bump 'i' and let it be the index of the "next" character instead.
|
|
c.eval("&") would cause a hang before for example.
|
|
strip() the faulty line (seeing that whitespace probably isn't helpful),
remove an assert that probably isn't useful in practice, and simplify
the code.
|
|
- The caret was always set to the end of the string in the current
version, which is pointless.
- Part of the error string was output manually, and part of it was part
of the exception message. Ugly oversight.
|
|
|
|
I must have missed that expandtabs() already takes the context of tabs
into account the first time around.
Also remove error check that probably won't be useful.
|
|
Use the fact that startswith() can check multiple prefixes.
|
|
Will also strip many '/'s, which makes sense here.
|
|
Also improves performance. A yield-based implementation would be
interesting to experiment with, to see if I/O + computation interleaving
helps here.
|
|
|
|
This is how it's always used in practice.
|
|
Probably not a noticeable win here, but might as well. The new ordering
isn't any worse than the old one in other respects.
Also remove a pointless assert. The condition would trigger an obvious
error immediately when false anyway.
|
|
Shaves a few % off parsing the x86 Kconfigs.
|
|
Much more common, so make it the fast case.
|
|
Prefetch the SRE_Pattern.match() methods. Shaves a few % off
Config._tokenize().
Do the same elsewhere for consistency, though I'm not sure if it's a
meaningful win.
|
|
|