)]}'
{
  "commit": "0787e5e3ea53929a53f6f648a9c4e2ca7f10b9b6",
  "tree": "71b8251d65efe56bd67f31f4096b6a1ab8e2af25",
  "parents": [
    "e12edbf0a06f1b10b102dc12f889b4fc37cd058a"
  ],
  "author": {
    "name": "gwt.team.scottb",
    "email": "gwt.team.scottb@8db76d5a-ed1c-0410-87a9-c151d255dfc7",
    "time": "Thu Dec 21 22:02:36 2006 +0000"
  },
  "committer": {
    "name": "gwt.team.scottb",
    "email": "gwt.team.scottb@8db76d5a-ed1c-0410-87a9-c151d255dfc7",
    "time": "Thu Dec 21 22:02:36 2006 +0000"
  },
  "message": "Fix for issue #497.  Reviewed by gwt.team.mmendez\nhttp://code.google.com/p/google-web-toolkit/issues/detail?id\u003d497\n\nThis is one of the most subtle compiler issues I\u0027ve ever debugged.  The \nfollowing sequence of events triggers the problem described in the issue.  \nAssume Foo is a class that implements IFoo.\n\n1) MakeCallsStatic creates a static implementation \"Foo.$foo()\" of \ninstance method \"Foo.foo()\"; tthis moves the body of foo() into $foo(), \nand replaces the body of foo() with a call to $foo()\n2) MethodInliner inlines calls to Foo.$foo() at all call sites, including \nthe call from Foo.foo()\n3) Pruner prunes Foo.$foo(), because it\u0027s been inlined everywhere, there \nare no outstanding calls to it\n4) More optimizations occur which allow an IFoo type variable to be \ntightened to a Foo type variables.\n5) MakeCallsStatic sees the tightened variable and statically resolves an \nIFoo.foo() call to a Foo.$foo(); unfortunately, $foo() has already been \npruned and there is no process for unpruning\n6) For various reasons, the new call to Foo.$foo() does not get inlined at \nthe new call site (this is a rare case, that it would get inlined \neverywhere else, but not here).\n7) Foo.$foo() does not get visited during GenerateJavaScriptAST (because \nit\u0027s pruned); the outstanding non-inlined call to it causes a compiler \nerror.\n\nMy solution addresses step #3 in the problem chain.  I modified Pruner so \nthat Foo.$foo() will not pruned as long as Foo.foo() is live, even if \nFoo.$foo() has been inlined into Foo.foo().  On the final pruning pass, we \nwill go ahead and prune Foo.$foo() if it\u0027s unreferenced.  By that time, \nMakeCallsStatic will never run again because all optimizations will \nbe done.\n\nHowever, having $foo() in limbo for some time raised a couple of issues.  \nI discovered that all of its parameters were being tightening to null, \nwhich led me to two observations.\n\n1) It doesn\u0027t make sense to nullflow an unreferenced parameter.  Period.  \nUnlike fields \u0026 locals, there is never an implicit null initialization; \nthe value has to come from SOMEWHERE.\n\n2) It doesn\u0027t make sense to make Foo.$foo()\u0027s params tighter than \nfoo()\u0027s params as long as foo() is still live.  This is because \nsome call site currently pointing to foo() may change and point at \n$foo() later, meaning $foo()\u0027s params are now invalidly too tight.  \nSo I made a special case upref from $foo() to foo(), which makes sense \nbecause the normal case is explicit type flow from foo() to $foo() when \ninlining does not occur.\n\nI fixed both of the above issues in TypeTightener.\n\nI also changed the semantics of the return value of \ntryInlineSimpleMethodCall to differentiate between methods that cannot be \ninlined (even in theory) and methods that cannot be inlined at this \nparticular call site.  This prevents a caching bug where a failure to \ninline at one site would prevent you from even trying at other sites.\n\nThere are also a couple of field sorts mixed into this patch.\n\n\n\n\ngit-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@220 8db76d5a-ed1c-0410-87a9-c151d255dfc7\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4df85d9b335fdfdfd4f721fcc4c10d5e03b278c9",
      "old_mode": 33188,
      "old_path": "dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java",
      "new_id": "7ea27b8a8feda2f415bbda247e07c73f3c64a42d",
      "new_mode": 33188,
      "new_path": "dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java"
    },
    {
      "type": "modify",
      "old_id": "78d45ec0e836d34359d9a5c21934162b9b1a90c7",
      "old_mode": 33188,
      "old_path": "dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java",
      "new_id": "3cce0f6eb0a7563e9346bd4f9b4c86206395fb49",
      "new_mode": 33188,
      "new_path": "dev/core/src/com/google/gwt/dev/jjs/impl/MethodInliner.java"
    },
    {
      "type": "modify",
      "old_id": "288fe330eea269f5e13f6428a3c5bde39e1ceb9f",
      "old_mode": 33188,
      "old_path": "dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java",
      "new_id": "a9c22a426c42e3e44eacc2ea3e7cc0ad0c2f7dce",
      "new_mode": 33188,
      "new_path": "dev/core/src/com/google/gwt/dev/jjs/impl/Pruner.java"
    },
    {
      "type": "modify",
      "old_id": "633c3c9a3253c90328f38df60c9dd0b465cbd0da",
      "old_mode": 33188,
      "old_path": "dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java",
      "new_id": "8136f94de17f9d8b4121f17a4898cd9aeaa26952",
      "new_mode": 33188,
      "new_path": "dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java"
    }
  ]
}
