-
Notifications
You must be signed in to change notification settings - Fork 0
[Implementation] A new Musictype
Radon Co edited this page Dec 18, 2016
·
3 revisions
Musictype is defined using structs.
Related source file for defining the type and its literals.
-
scanner/parser/ast/sast
-
analyzer(get_type_from_expr, build_sast_expr)
-
environment(builtin_types_list)
-
pprint(string_of_datatype, json_of_expr)
-
codegen(lltype_of_datatype, get_bind_type (if it's not primitive), codegen_expr, codegen_expr_ref)
- Note that load_id only loads primitives.
- There are two strategies in codegen_assign, store and memcpy. For store, it should be primitive. For memcpy, if (codegen_expr_ref lhs) returns ref(datatype), (codegen_expr rhs) returns ref(datatype), and lltype_of_datatype is good to go, codegen_assign just works.
- beathoven.h, stdlib.c: implement _str_of_the_datatype() to help debug