X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftop%2FToplevelEffectDecorator.java;h=5a3c39e60a3fcecd9f56bf68cc6a2a8f32cf85d1;hp=56325d513e58d6f32e244d6ff2adb2515f649bbe;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ToplevelEffectDecorator.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ToplevelEffectDecorator.java index 56325d513..5a3c39e60 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ToplevelEffectDecorator.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ToplevelEffectDecorator.java @@ -3,6 +3,7 @@ package org.simantics.scl.compiler.top; import java.util.ArrayList; import org.simantics.scl.compiler.common.names.Name; +import org.simantics.scl.compiler.common.names.Names; import org.simantics.scl.compiler.elaboration.expressions.EApply; import org.simantics.scl.compiler.elaboration.expressions.EConstant; import org.simantics.scl.compiler.elaboration.expressions.EEnforce; @@ -72,7 +73,7 @@ public class ToplevelEffectDecorator implements ExpressionDecorator { ArrayList concreteEffects = new ArrayList(); effect.collectConcreteEffects(concreteEffects); if(concreteEffects.contains(Types.WRITE_GRAPH)) { - Name name = Name.create("Simantics/DB", "syncWrite"); + Name name = Names.Simantics_DB_syncWrite; SCLValue transactionFunction = environment.getValue(name); if(transactionFunction == null) { errorLog.log(expression.location, "Cannot locate " + name); @@ -82,7 +83,7 @@ public class ToplevelEffectDecorator implements ExpressionDecorator { expression = decorate(transactionFunction, Types.WRITE_GRAPH, expression); } else if(concreteEffects.contains(Types.READ_GRAPH)) { - Name name = Name.create("Simantics/DB", "syncRead"); + Name name = Names.Simantics_DB_syncRead; SCLValue transactionFunction = environment.getValue(name); if(transactionFunction == null) { errorLog.log(expression.location, "Cannot locate " + name); @@ -92,7 +93,7 @@ public class ToplevelEffectDecorator implements ExpressionDecorator { expression = decorate(transactionFunction, Types.READ_GRAPH, expression); } if(concreteEffects.contains(R)) { - Name name = Name.create("R/R", "runR"); + Name name = Names.R_R_runR; SCLValue transactionFunction = environment.getValue(name); if(transactionFunction == null) { errorLog.log(expression.location, "Cannot locate " + name); @@ -102,7 +103,7 @@ public class ToplevelEffectDecorator implements ExpressionDecorator { expression = decorate(transactionFunction, R, expression); } if(concreteEffects.contains(Types.RANDOM)) { - Name name = Name.create("Random", "runRandom"); + Name name = Names.Random_runRandom; SCLValue transactionFunction = environment.getValue(name); if(transactionFunction == null) { errorLog.log(expression.location, "Cannot locate " + name);