*** Reason for rollback ***

Breaks people

*** Original change description ***

Make splitpoint.xml CodeSplitter2 aware.

Review at http://gwt-code-reviews.appspot.com/1639803


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10880 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorder.java b/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorder.java
index 5ffc1cc..bb507f8 100644
--- a/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorder.java
+++ b/dev/core/src/com/google/gwt/core/ext/soyc/impl/SplitPointRecorder.java
@@ -18,7 +18,6 @@
 import com.google.gwt.core.ext.TreeLogger;
 import com.google.gwt.dev.jjs.ast.JProgram;
 import com.google.gwt.dev.jjs.ast.JRunAsync;
-import com.google.gwt.dev.jjs.impl.CodeSplitter2.FragmentPartitioningResult;
 import com.google.gwt.dev.util.HtmlTextOutput;
 import com.google.gwt.util.tools.Utility;
 
@@ -55,7 +54,6 @@
       htmlOut.indentIn();
 
       List<JRunAsync> runAsyncs = jprogram.getRunAsyncs();
-      FragmentPartitioningResult partitionResult = jprogram.getFragmentPartitioningResult();
       if (runAsyncs.size() > 0) {
         curLine = "<splitpoints>";
         htmlOut.printRaw(curLine);
@@ -64,9 +62,6 @@
         htmlOut.indentIn();
         for (JRunAsync runAsync : runAsyncs) {
           int sp = runAsync.getSplitPoint();
-          if (partitionResult != null) {
-            sp = partitionResult.getFragmentFromSplitPoint(sp);
-          }
           String name = runAsync.getName();
           curLine = "<splitpoint id=\"" + sp + "\" location=\"" + name + "\"/>";
           htmlOut.printRaw(curLine);
@@ -89,9 +84,6 @@
         htmlOut.indentIn();
 
         for (int sp : jprogram.getSplitPointInitialSequence()) {
-          if (partitionResult != null) {
-            sp = partitionResult.getFragmentFromSplitPoint(sp);
-          }
           curLine = "<splitpointref id=\"" + sp + "\"/>";
           htmlOut.printRaw(curLine);
           htmlOut.newline();
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
index 9cb3da6..18835af 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
@@ -309,8 +309,8 @@
 
     // If there were some fragment merging.
     if (result != null) {
-      sp1 = result.getSplitPointFromFragment(sp1);
-      sp2 = result.getSplitPointFromFragment(sp2);
+      sp1 = result.getSplitPointFromFragmnet(sp1);
+      sp2 = result.getSplitPointFromFragmnet(sp2);
     }
     
     int initPos1 = initialSeq.indexOf(sp1);
@@ -681,10 +681,6 @@
     // Initial fragment is the +1.
     return runAsyncs.size() + 1;
   }
-  
-  public FragmentPartitioningResult getFragmentPartitioningResult() {
-    return fragmentPartitioninResult;
-  }
 
   public JDeclaredType getFromTypeMap(String qualifiedBinaryOrSourceName) {
     String srcTypeName = qualifiedBinaryOrSourceName.replace('$', '.');
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter2.java b/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter2.java
index 347088d..9d9e82b 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter2.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/CodeSplitter2.java
@@ -102,10 +102,8 @@
    */
   public static final class FragmentPartitioningResult {
     private final int[] fragmentToSplitPoint;
-    private final int[] splitPointToFragmentMap;
     
     private FragmentPartitioningResult(int[] splitPointToFragmentMap, int numFragments) {
-      this.splitPointToFragmentMap = splitPointToFragmentMap;
       fragmentToSplitPoint = new int[numFragments];
       for (int i = 0, len = splitPointToFragmentMap.length - 1; i < len; i++) {
         System.out.println("splitPointToFragmentMap[" + i + "] = " + splitPointToFragmentMap[i]);
@@ -118,14 +116,7 @@
         }
       }
     }
-
-    /**
-     * @return Fragment index from a splitpoint number.
-     */
-    public int getFragmentFromSplitPoint(int splitpoint) {
-      return splitPointToFragmentMap[splitpoint];
-    }
-
+    
     /**
      * @return Fragment number of the left over fragment.
      */
@@ -144,11 +135,11 @@
      * @return One of the split point number in a given fragment. If there
      *     are more than one splitpoints in the a fragment, -1 is returned.
      */
-    public int getSplitPointFromFragment(int fragment) {
+    public int getSplitPointFromFragmnet(int fragment) {
       return fragmentToSplitPoint[fragment];
     }
   }
-
+  
   /**
    * Marks the type of partition heuristics 
    */