1 package org.simantics.scl.compiler.elaboration.chr.plan;
3 import org.simantics.scl.compiler.compilation.CompilationContext;
4 import org.simantics.scl.compiler.elaboration.expressions.Expression;
5 import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
7 public class CheckOp extends PlanOp {
8 public Expression condition;
10 public CheckOp(long location, Expression condition) {
12 this.condition = condition;
16 public void toString(StringBuilder b) {
17 b.append("CHECK ").append(condition);
21 public void generateCode(CompilationContext context, PlanContext planContext, CodeWriter w) {
22 planContext.check(location, w, condition.toVal(context.environment, w));