http://codereview.chromium.org/62146/diff/4001/4008
File src/func-name-inferrer.cc (right):

http://codereview.chromium.org/62146/diff/4001/4008#newcode39
Line 39: // and starts with a capital letter.
On 2009/04/13 23:50:11, Søren Gjesse wrote:
> Should we enforce the capital first letter?

It would make sense to add "warnings" to V8 compiler checking that
constructors (and only them) are called using the "new" operator. But I
don't think that we should enforce anything in the name inferrer.

http://codereview.chromium.org/62146/diff/4001/4015
File src/rewriter.cc (left):

http://codereview.chromium.org/62146/diff/4001/4015#oldcode798
Line 798: if (!scope->is_global_scope()) {
On 2009/04/13 23:50:11, Søren Gjesse wrote:
> Any idea why the global scope used to be skipped here?

Kevin said that "The AstOptimizer was originally intended as an analysis
pass that would allow us to make inlining decisions in generated code.
Since we didn't intend to do any inlining at the global scope anyway,
there was no need."

I suggest that it makes no harm running it for the global scope, except
for some performance penalty in parsing. As I said, I'm avoiding adding
another pass, and no other AstVisitor suits better for doing name
inference. Let's wait for Kasper before submitting.

http://codereview.chromium.org/62146

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

Reply via email to