Revision: 6850
Author: [email protected]
Date: Wed Nov 11 15:09:52 2009
Log: Fixed links from CompilationUnit.wiki -> CompilationUnit_1_5.wiki.
http://code.google.com/p/google-web-toolkit/source/detail?r=6850
Modified:
/wiki/CompilationUnit.wiki
=======================================
--- /wiki/CompilationUnit.wiki Wed Nov 11 15:07:51 2009
+++ /wiki/CompilationUnit.wiki Wed Nov 11 15:09:52 2009
@@ -1,12 +1,12 @@
#summary The new design for building CompilationState as of GWT 2.0
#labels Phase-Design
-_NOTE: For the older, GWT 1.5 design please see CompilationUnit_1_5._
+_NOTE: For the older, GWT 1.5 design please see [CompilationUnit_1_5]._
= Building {{{CompilationState}}} and {{{TypeOracle}}} =
== Problem and Background ==
Before GWT 2.0, {{{CompilationState}}}, and {{{TypeOracle}}} were
per-module singletons. Unfortunately, they were also currently quite
stateful. In hosted mode in particular, types were added to
{{{TypeOracle}}} and {{{CompilationState}}} over time as Generators ran,
then those types were removed on refresh. This was not a problem as long as
a user only has one "session" at a time open. However, in 2.0 out of
process development mode encourages patterns where users might concurrently
access the same module in multiple tabs, or multiple browsers. In this
case, unpredictable behavior was likely to occur. This problem also
manifested trying to do a JUnit test using multiple concurrent dev mode
browsers.
-For more pre-2.0 background, please see CompilationUnit_1_5.
+For more pre-2.0 background, please see [CompilationUnit_1_5].
== Basic Solution ==
We create multiple instances of {{{CompilationState}}}, one per active dev
mode sesions, or per concurrent compile. Each {{{CompilationState}}} state
has its own {{{TypeOracle}}}, and neither of these can be reset
or "refreshed". They operate in a forward-only fashion.. new types can be
added via generators, but existing types cannot be removed or changed.
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---