aboutsummaryrefslogtreecommitdiff
path: root/core/runtime.odin
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-09-19 23:59:26 +0100
committerGinger Bill <bill@gingerbill.org>2016-09-19 23:59:26 +0100
commit59b0cf61efdccc44efafda24ff59399dde6afc4d (patch)
tree35162a81623e3482929f7c6e3415d517cdf478eb /core/runtime.odin
parent3b266b194f36507208b6f90145475d93b53896ee (diff)
fmt improvement; Minor refactoring
Diffstat (limited to 'core/runtime.odin')
-rw-r--r--core/runtime.odin12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/runtime.odin b/core/runtime.odin
index 8fa840597..52c3f68a0 100644
--- a/core/runtime.odin
+++ b/core/runtime.odin
@@ -63,6 +63,18 @@ Type_Info :: union {
}
}
+type_info_base :: proc(info: ^Type_Info) -> ^Type_Info {
+ for {
+ match type i : info {
+ case Type_Info.Named:
+ info = i.base
+ continue
+ }
+
+ return info
+ }
+}
+
assume :: proc(cond: bool) #foreign "llvm.assume"