Appearance
| 1 | namespace IR.Values is | |
| 2 | use TypeTyped = Semantic.Types.Typed | |
| 3 | use Semantic.Types.Type | |
| 4 | ||
| 5 | class HAS_VALUE: Value, TypeTyped is | |
| 6 | type: Type | |
| 7 | ||
| 8 | value: Value | |
| 9 | ||
| 10 | init( | |
| 11 | value: Value, | |
| 12 | type: Type | |
| 13 | ) is | |
| 14 | super.init() | |
| 15 | ||
| 16 | self.value = value | |
| 17 | self.type = type | |
| 18 | si | |
| 19 | ||
| 20 | gen(context: IR.CONTEXT) is | |
| 21 | gen(value, context) | |
| 22 | ||
| 23 | let body = context.current_srm_body_emitter! | |
| 24 | body.ldnull() | |
| 25 | body.op(System.Reflection.Metadata.ILOpCode.CGT_UN) | |
| 26 | si | |
| 27 | ||
| 28 | to_string() -> string => | |
| 29 | "has-value:[{type}]({value})" | |
| 30 | si | |
| 31 | si |