[Question][Hw7] (Several Questions) Casting, (ret (type_env f)), fun_of #369
-
|
Hi, I have several questions. I successfully(?) made my way to implement almost everything, but few questions are left in my mind.
Sorry for too much question. I would appreciate any partial answer! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
-
|
@kangwoosukeq Thank you!!! |
Beta Was this translation helpful? Give feedback.
You can use
Llvm.type_ofto extract the instruction type. Also, this instruction does not change the type of%4. It makesi32type%convby castingi8type%4.You can debug your code using functions like
print_endline. Intypesystem.ml, all definitions of types and utility functions are defined.ret_ofandparam_ofare just matching functions for the given value.Actually, you don't need to use all functions in
typesystem.ml. Use them for your purpose.