Any thoughts here? Caitlin is currently running into exactly the same need
in her do expression patch, so it'd be good to understand if we can do
something general here instead of having most AST visitors be Isolate-bound
while the few used from the parser need special duplicated code for stack
check handling.

On Tue, Oct 6, 2015 at 4:17 PM, Adam Klein <ad...@chromium.org> wrote:

> In trying to use AstExpressionVisitor in the parser, I've found the need
> to use an AST visitor where I don't have an Isolate handy. The
> DEFINE_AST_VISITOR_SUBCLASS_MEMBERS macro uses the Isolate for exactly one
> thing (in the method CheckStackOverflow):
>
> ...
> StackLimitCheck check(isolate_);
> if (!check.HasOverflowed()) return false;
> ...
>
> My question is this: is it important that the StackLimitCheck pull the
> stack limit out of the isolate every time CheckStackOverflow() is called?
> Or could we store the stack limit when AST visitors are constructed? The
> latter is what we already do for parsing, in ParseInfo. And from poking
> around the code (and in Blink) it seems like we generally only set the
> stack limit at thread startup. But I'm wondering if there are cases I'm not
> thinking about (maybe cases where a single AST visitor is used on multiple
> threads with the same Isolate?).
>
> - Adam
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to