aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-13 00:22:31 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitad54d804fef1e1eb646d8ea4bd7ce65363e94fa8 (patch)
tree41c2d7d9979c98bdd508929a01949ba2f02c679b /include
parent2d2c31cc18aa9af2cdf26fa462edf7a164d45328 (diff)
Fix bugs
Fix hash map bug on rorder (invalid size). Fix string to int/float conversion in tokenizer. Add more ssa functions
Diffstat (limited to 'include')
-rw-r--r--include/ssa/ssa.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/ssa/ssa.h b/include/ssa/ssa.h
index a21b45a..5411259 100644
--- a/include/ssa/ssa.h
+++ b/include/ssa/ssa.h
@@ -27,7 +27,10 @@ typedef enum {
} SsaNumberType;
typedef struct {
- i64 value;
+ union {
+ i64 integer;
+ f64 floating;
+ } value;
SsaNumberType type;
} SsaNumber;
@@ -44,7 +47,8 @@ typedef struct {
} Ssa;
/* None of these functions are thread-safe */
-SsaNumber create_ssa_number(i64 value, SsaNumberType type);
+SsaNumber create_ssa_integer(i64 value);
+SsaNumber create_ssa_float(f64 value);
CHECK_RESULT int ssa_init(Ssa *self, ScopedAllocator *allocator);
CHECK_RESULT int ssa_get_unique_reg(Ssa *self, SsaRegister *result);