Full change comment: " Changes trampoline function to use "instance of
JavaScriptObject". Modifies TypeTightener and CastNormalizer to cleanup dead
trampolines. Controversial change: "jsoType instanceof JavaScriptObject" is
allowed to be replaced with a literal "true" rather than "jsoType != null",
since the latter prevents cleanup of the false conditional which is always
null.someMethod(). This means NPEs would be deferred to the body of the JSO
method, but this is actually the current state of affairs with normal JSNI
method dispatch on JSOs. This more or less brings interface dispatch in line
with JSO dispatch. However if means (if (jsoType instanceof
JavaScriptObject)) returns true even if jsoType is null. I put it up for
debate if this is actually a problem."

Also, I realize there is duplicate logic in TypeTightener vs CastNormalizer
that could be refactored into a method, I chose to leave them separate for
now because a) lack of good place for them to live and b) potential need to
change CastNormalizer to have different cleanup logic.   The code is
duplicated because TypeTightener doesn't catch all cases where instanceof
checks can be elided, and it may be possible for CastNormalizer to be run
without TightTightener.


On Wed, Feb 16, 2011 at 3:48 PM, <cromwell...@google.com> wrote:

> http://gwt-code-reviews.appspot.com/1351801/show
>

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

Reply via email to