On Thu, Feb 17, 2011 at 12:44 PM, <[email protected]> wrote:

> With the current preparsing there are syntax errors that we cannot catch
> at preparse-time (e.g., "continue x" where x isn't the label of a loop,
> because we record neither labels nor loops during preparsing). We can't
> catch those until the function is parsed properly the first time, and if
> it's lazy, that might be when it's attempted inlined.
>
>
Yeah, that's why I made the tongue in cheek suggestion to replace the lazy
(re)compile stub with a "throw syntax error" compilation stub.

The simplest thing is probably to disable optimization on the
SharedFunctionInfo for those functions.  That should render it
non-inlineable as well.  Can you think of a reason this wouldn't work?


> Another option is to make uncompiled functions not optimizable.
> Currently when we check if we can optimize a function, if it's
> uncompiled we optimistically assume that it is.
>

We could also try that.  In that case we definitely do not have type
feedback for them, so it might be reasonable from a performance standpoint
to require them to go through the baseline compiler first.

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to