[RFC PATCH 06/20] add initial FI_TYPED_CONSTANT instruction

Asbjørn Sloth Tønnesen ast at 2e8.dk
Mon Dec 30 17:56:32 CET 2019


This instruction will eventually be replaced by FI_CONSTANT.
---
 filter/f-inst.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/filter/f-inst.c b/filter/f-inst.c
index 51a35350..37fa0f39 100644
--- a/filter/f-inst.c
+++ b/filter/f-inst.c
@@ -438,6 +438,15 @@
     RESULT_VAL(fstk->vstk[curline.vbase + sym->offset]);
   }
 
+  INST(FI_TYPED_CONSTANT, 0, 1) {
+    SYMBOL;
+    NEVER_CONSTANT;
+    RESULT_TYPE(sym->class & 0xff);
+
+    FID_INTERPRET_BODY()
+    runtime("FI_TYPED_CONSTANT can't be interpreted", sym);
+  }
+
   INST(FI_CONSTANT, 0, 1) {
     FID_MEMBER(
       struct f_val,
-- 
2.24.0



More information about the Bird-users mailing list