1 package org.simantics.scl.compiler.internal.codegen.utils;
3 import org.simantics.scl.compiler.common.names.Name;
4 import org.simantics.scl.compiler.constants.SCLConstant;
5 import org.simantics.scl.compiler.errors.ErrorLog;
6 import org.simantics.scl.compiler.internal.codegen.ssa.SSAClosure;
7 import org.simantics.scl.compiler.internal.codegen.ssa.SSAModule;
9 public class SSALambdaLiftingContext {
15 public SSALambdaLiftingContext(SSAModule module, ErrorLog errorLog) {
17 this.errorLog = errorLog;
20 public void setParentName(Name parentName) {
21 this.parentName = parentName;
25 public Name createName() {
26 return Name.create(parentName.module, parentName.name + "$" + (++count));
29 public void addConstant(SCLConstant constant) {
30 module.put(constant.getName(), constant);
33 public void validate() {
37 public ErrorLog getErrorLog() {
41 public void addClosure(SSAClosure closure) {
42 module.closuresToGenerate.add(closure);