]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/constraints/Reduction.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / elaboration / constraints / Reduction.java
1 package org.simantics.scl.compiler.internal.elaboration.constraints;\r
2 \r
3 import org.simantics.scl.compiler.elaboration.expressions.Expression;\r
4 import org.simantics.scl.compiler.top.SCLCompilerConfiguration;\r
5 import org.simantics.scl.compiler.types.TPred;\r
6 import org.simantics.scl.compiler.types.Type;\r
7 \r
8 class Reduction {\r
9     Expression generator;\r
10     Type[] parameters;\r
11     TPred[] demands;\r
12     \r
13     public Reduction(Expression generator, Type[] parameters, TPred[] demands) {\r
14         if(SCLCompilerConfiguration.DEBUG) {\r
15             if(generator == null)\r
16                 throw new NullPointerException();\r
17             for(Type parameter : parameters)\r
18                 if(parameter == null)\r
19                     throw new NullPointerException();\r
20             for(Type demand : demands)\r
21                 if(demand == null)\r
22                     throw new NullPointerException();\r
23         }\r
24         this.generator = generator;\r
25         this.parameters = parameters;\r
26         this.demands = demands;\r
27     }\r
28 }\r