Okay, here is a patch that gives the bootstrap entry method an enclosing class. It went together simply; I simply updated all references to JProgram.entryMethods. The one non-trivial part was GenerateJavaScriptAST, which used to pick up entry methods by looking at the first (or last?) thing that a JProgram visits. Now the entry methods get seen at difficult to predict times during the traversal of the JProgram, so GenerateJavaScriptAST has an array to record them as they come by. It turns out this is the only method I could find that does not have an enclosing class, so the patch includes an assert.
I ended up not adding a single entry class, because it would cause awkwardness for the runAsync entry methods. Each runAsync call generates a class with multiple methods, and one of those methods is an entry method. To have a single entry class, that method would have to be moved over to the entry class, and so the standard generator framework wouldn't work out of the box. So, I left it be for now. Can you review it, Scott, or pass it to someone? -Lex --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
allMethodsHaveClass-r3723.patch
Description: Binary data
