You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
David Majda bb83b2189a Change how disabling failure reporting works in generated parsers
Disabling failure reporting is driven by the |reportFailures| variable.
So far it was a boolean and its value was saved before changing and
restored afterwards (requiring additional variable in few places). This
patch changes it to an integer where value 0 means "report errors" and
anything > 0 means "do not report errors".  Instead of saving/restoring
we can now simple increment/decrement (avoiding the additional
variable and simplifying the code).

This change speeds up the benchmark suite execution by 0.66%.

Detailed results (benchmark suite totals as reported by "jake benchmark"
on Node.js 0.4.8):

-----------------------------------
 Test #      Before        After
-----------------------------------
      1   129.26 kB/s   128.28 kB/s
      2   127.34 kB/s   127.53 kB/s
      3   126.72 kB/s   129.01 kB/s
      4   126.89 kB/s   128.05 kB/s
      5   126.46 kB/s   127.98 kB/s
-----------------------------------
Average   127.33 kB/s   128.17 kB/s
-----------------------------------
13 years ago
..
checks.js Compiler checks and passes are named for easier reference from tests 14 years ago
compiler.js Remove now mostly useless comment headers from the code 14 years ago
emitter.js Change how disabling failure reporting works in generated parsers 13 years ago
parser.js Change how disabling failure reporting works in generated parsers 13 years ago
parser.pegjs Add two missing |var|s (fix global namespace pollution) 14 years ago
passes.js Compiler checks and passes are named for easier reference from tests 14 years ago
peg.js Add PEG.js version information and homepage header to peg.js 13 years ago
utils.js Export the PEG library in simpler and more robust way 13 years ago