]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/analysis/LoopAnalysis.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / codegen / analysis / LoopAnalysis.java
index 853f316eef342c12223faf57626c00d610b2d3b4..34f6578e33e847619a4ed6c3c62c090d9f0d2399 100644 (file)
@@ -1,6 +1,7 @@
 package org.simantics.scl.compiler.internal.codegen.analysis;\r
 \r
 import org.simantics.scl.compiler.common.names.Name;\r
+import org.simantics.scl.compiler.common.names.Names;\r
 import org.simantics.scl.compiler.constants.SCLConstant;\r
 import org.simantics.scl.compiler.internal.codegen.references.Val;\r
 import org.simantics.scl.compiler.internal.codegen.references.ValRef;\r
@@ -58,8 +59,6 @@ public class LoopAnalysis {
             return isLoopingBlockWithBreaker(apply.getParent(), breaker);\r
         }\r
     }    \r
-\r
-    private static final Name BUILD = Name.create("Prelude", "build");\r
     \r
     private static boolean isAppliedAtMostOnce(LetApply apply, ValRef funRef, SSAFunction function) {\r
         ValRef applyFunctionRef = apply.getFunction();\r
@@ -70,7 +69,7 @@ public class LoopAnalysis {
         if(!(applyFunction instanceof SCLConstant))\r
             return false; // Not necessarily the right answer\r
         Name name = ((SCLConstant)applyFunction).getName();\r
-        if(name == BUILD)\r
+        if(name == Names.Prelude_build)\r
             return true;\r
         return false;\r
     }\r