High level, I think we should get rid of __newSeed__ and abolish the
idea of seed functions entirely... we don't need them.

Instead, we only setup prototypes on actual real live constructors.  We
also get rid of super-prototype-chaining.  Instead, we just manually
copy all the fields from the super-proto onto the sub proto.  Setup is
slightly slower, but then lookups throughout the program life cycle are
faster.


http://gwt-code-reviews.appspot.com/1360802/diff/1/4
File dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
(right):

http://gwt-code-reviews.appspot.com/1360802/diff/1/4#newcode523
dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java:523:
private int nextSeedId;
Just assign it inline.

http://gwt-code-reviews.appspot.com/1360802/diff/1/5
File dev/core/src/com/google/gwt/dev/jjs/impl/SeedUtil.java (right):

http://gwt-code-reviews.appspot.com/1360802/diff/1/5#newcode44
dev/core/src/com/google/gwt/dev/jjs/impl/SeedUtil.java:44: private
static final String DEFINE_SEED = "function
__defineSeed__(id,superSeed,castableTypeMap,classLiteral) {\n"
Would it be a huge pain to extern this into a .js file in the same
package, and use getClass().getResource() one time to statically
initialize?

http://gwt-code-reviews.appspot.com/1360802/diff/1/5#newcode51
dev/core/src/com/google/gwt/dev/jjs/impl/SeedUtil.java:51: + "     _." +
_CASTABLE_TYPE_MAP_MARKER + "=castableTypeMap;\n"
If the castable type map optional?  Should be optional for abstract
types.

http://gwt-code-reviews.appspot.com/1360802/diff/1/6
File dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java (right):

http://gwt-code-reviews.appspot.com/1360802/diff/1/6#newcode566
dev/core/src/com/google/gwt/dev/js/JsStackEmulator.java:566: private
boolean inDefineSeedCall = false;
Instead of doing this explicitly, what if emulation simply ignored any
code that is SourceOrigin.UNKNOWN?

http://gwt-code-reviews.appspot.com/1360802/show

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

Reply via email to