Bob, Woohoo! I assume this patch general purpose and would allow any of the Js optimization passes to introduce new string literals? I ask because I ran into the problem a few months ago when I wanted to introduce some extra stuff into JsStaticEval for mirroring the Simplifier in the Java AST (concating strings) but at the time, there was a very scary warning on the JsProgram.getStringLiteral :), which appears gone now, so I assume all restrictions are gone?
-Ray On Mon, Jul 27, 2009 at 3:56 PM, <[email protected]> wrote: > > Reviewers: Lex, scottb, > > Message: > Review requested. > > @Lex, the implementation follows our IM discussion pretty much as > discussed. > > Description: > This patch changes the way code-splitting and string interning is > performed on the JS AST to allow new strings to be introduced by > JsVisitors (such as JsStackEmulator). > > Changes: > - Remove string tracking from CodeSplitter > - JsStringInterner is made aware of code splitting and is run after > CodeSplitter > - JProgram exposes a new API to indicate fragment load order > > JProgram.lastFragmentLoadingBefore should be extracted into an interface > which JsStringInterner depends on. Is is called "LoadOrderOracle"? > > Please review this at http://gwt-code-reviews.appspot.com/51820 > > Affected files: > M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java > M dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java > M dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter.java > M dev/core/src/com/google/gwt/dev/jjs/impl/FragmentExtractor.java > M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java > M dev/core/src/com/google/gwt/dev/jjs/impl/JavaToJavaScriptMap.java > M dev/core/src/com/google/gwt/dev/js/JsStringInterner.java > M dev/core/src/com/google/gwt/dev/js/ast/JsProgram.java > A > > dev/core/test/com/google/gwt/dev/javac/JProgramLastFragmentLoadingBeforeTest.java > M dev/core/test/com/google/gwt/dev/javac/JavaCompilationSuite.java > > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
