On 2015/05/19 16:20:58, wingo wrote:
On 2015/05/19 15:15:41, wingo wrote:
> Another thing that could work would be to write errors into a buffer
instead,
> and the buffer doesn't get copied. An ExpressionClassifier would
become a
> pointer to the start of the buffer, along with a mask of
invalid-production
> errors seen since the start of the buffer. I guess you'd allocate the
buffer
in
> the zone. This could also allow for varying sizes of errors, if that
mattered.
I tried this and it didn't help. On the other hand, adding a simple "if
(errors
== 0) return" shortcut to Accumulate() golfed me down to 910M
instructions,
which is getting there.
It turns out that this bailout was too early, as it wasn't propagating the
ArrowFormalParametersProduction bit; adding that back in got us back to
915M.
Irritating.
Regarding buffers: there should be some way to use a buffer as a stack.
Like,
whenever you go to assert that something is an expression (or some other
terminal production), you can truncate the buffer back to where it was when
the
ExpressionClassifier was created. If you need to signal an error, it's
probably
acceptable to do linear search within some range of the buffer; you'd have
to
record the pushes and pops of when you make new ExpressionClassifiers
though.
Anyway that might allow ExpressionClassifier itself to not have to hold onto
individual error locations, and just be a buffer offset + bitmask.
https://codereview.chromium.org/1140813008/
--
--
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/d/optout.