From 0632650d0e4250e08a76982ab2713a34e3531b33 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 30 Jul 2022 13:30:34 -0700 Subject: Add the typeof opcode. --- csc/encoding.csc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'csc/encoding.csc') diff --git a/csc/encoding.csc b/csc/encoding.csc index 1208993..9afa40f 100644 --- a/csc/encoding.csc +++ b/csc/encoding.csc @@ -171,6 +171,10 @@ (make-opcode w 14 (is-const? size) #f) (arg->le-bytes w dest) (arg->le-bytes w size)) + (('typeof dest x) + (make-opcode w 15 (is-const? x) #f) + (arg->le-bytes w dest) + (arg->le-bytes w x)) (_ (error "invalid opcode" opcode)))) -- cgit v1.3.1