From 601b6fc0d446fa2550d7b3b8b03965e05e8b661f Mon Sep 17 00:00:00 2001 From: falsycat Date: Sun, 3 Jan 2021 00:00:00 +0000 Subject: [PATCH] Removes unused types, f16/f32/f64. --- TODO.TXT | 2 +- transpile_c.c | 3 --- tree.c | 3 --- tree.h | 3 --- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/TODO.TXT b/TODO.TXT index 976313c..c174187 100644 --- a/TODO.TXT +++ b/TODO.TXT @@ -1,4 +1,4 @@ X resolve all TODO in source codes - remove f16/f32/f64 types +X remove f16/f32/f64 types partial code generation for C (divide decls and functions) release v1.0.1 diff --git a/transpile_c.c b/transpile_c.c index 62e488e..01c2e2a 100644 --- a/transpile_c.c +++ b/transpile_c.c @@ -34,9 +34,6 @@ static const struct_member_type_name_meta_t struct_member_type_name_meta_map_ [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI16] = {"b16", "int16_t"}, [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI32] = {"b32", "int32_t"}, [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI64] = {"b64", "int64_t"}, - [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F16] = {"f16", "float"}, - [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F32] = {"f32", "float"}, - [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F64] = {"f64", "double"}, }; static const char* const expr_operator_string_map_ diff --git a/tree.c b/tree.c index 67ebc57..8f08cf9 100644 --- a/tree.c +++ b/tree.c @@ -31,9 +31,6 @@ biner_tree_struct_member_type_name_meta_map [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI16] = {"bi16", 2}, [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI32] = {"bi32", 4}, [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI64] = {"bi64", 8}, - [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F16] = {"f16", 2}, - [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F32] = {"f32", 4}, - [BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F64] = {"f64", 8}, }; biner_tree_parse_context_t biner_tree_parse_context_ = {0}; diff --git a/tree.h b/tree.h index 3714cc0..17e9ac7 100644 --- a/tree.h +++ b/tree.h @@ -70,9 +70,6 @@ typedef enum biner_tree_struct_member_type_name_t { BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI16, BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI32, BINER_TREE_STRUCT_MEMBER_TYPE_NAME_BI64, - BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F16, - BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F32, - BINER_TREE_STRUCT_MEMBER_TYPE_NAME_F64, BINER_TREE_STRUCT_MEMBER_TYPE_NAME_USER_DECL, BINER_TREE_STRUCT_MEMBER_TYPE_NAME_MAX_,