On Wed, Feb 18, 2009 at 8:50 AM, Joel Webber <j...@google.com> wrote:
> ControlFlowAnalyzer:
> - Just to make sure I understand this correctly, can you explain why we had
> to move the class-literal rescue code to JVariable?

Because of ::class references; access to class literals from JSNI is
handled as though it were a field reference.  I could change
JsniMethodBody.traverse() to examine it's field references and
construct JClassLiterals to pass into JVisitor.accept() if you think
it would be more clear as to what's gong on.

> JProgram/CompilingClassLoader:
> - It feels like there's got to be some way to merge the implementations of
> getTypeFromJsniRef() and getClassFromBinaryName(). Feel free to tell me it's
> not worth it, though.

They operate on totally different data-types.  getTypeFromJsniRef()
needs access to JProgram fields, but getClassFromBinaryName() doesn't
seem appropriate to add to JProgram.

> JsInliner:
> - (861) Why the comment about clinits being folded into the JsProgram body?
> I think I'm missing something here -- are we calling clinits in a context
> where they might get inlined directly into the outer scope?

ClassLiteralHolder's clinit is effectively inlined into the JProgram
in GenerateJavaScriptAST.generateClassLiterals.

> In the jjs tests, is there any eay way to share all those class name tests
> (i.e. startsWith("Class$")) without getting into heavy refactoring? It seems
> like we're only going to run into this sort of thing more as we start
> implementing optional optimizations (e.g. disable cast-checking), and it
> would be good to start a sensible pattern for these kinds of tests.

I agree that there should be some common way of querying wether or not
a particular optimization is applied for those tests that test for
specific optimizations.  Implement System.getProperties() to return
compiler flags and module properties and a utility class to interpret
them?

-- 
Bob Vawter
Google Web Toolkit Team

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to