Emits code to set `reg` to the default value for `vtype`.
(&mut self, reg: Register, vtype: ExprType, pos: LineCol)
| 112 | |
| 113 | /// Emits code to set `reg` to the default value for `vtype`. |
| 114 | pub(super) fn emit_default(&mut self, reg: Register, vtype: ExprType, pos: LineCol) { |
| 115 | let instr = match vtype { |
| 116 | ExprType::Boolean | ExprType::Double | ExprType::Integer => { |
| 117 | bytecode::make_load_integer(reg, 0) |
| 118 | } |
| 119 | ExprType::Text => bytecode::make_alloc(reg, ExprType::Text), |
| 120 | }; |
| 121 | self.emit(instr, pos); |
| 122 | } |
| 123 | |
| 124 | /// Emits code to set `reg` to the specific `datum` value. |
| 125 | pub(super) fn emit_value( |
no test coverage detected