From 66b9f2589107f60041f024873512f93c9c8aee63 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 24 May 2016 17:31:56 +0800 Subject: (minor) HIR - Planning for const eval --- src/hir/hir.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/hir/hir.hpp b/src/hir/hir.hpp index 4236e8ac..f77c2a14 100644 --- a/src/hir/hir.hpp +++ b/src/hir/hir.hpp @@ -42,9 +42,11 @@ struct VisEnt /// NOTE: Intentionally minimal, just covers the values (not the types) TAGGED_UNION(Literal, Invalid, (Invalid, struct {}), + // List = Array, Tuple, struct literal (List, ::std::vector), (Integer, uint64_t), (Float, double), + // String = &'static str or &[u8; N] (String, ::std::string) ); @@ -53,21 +55,20 @@ TAGGED_UNION(Literal, Invalid, // -------------------------------------------------------------------- struct Static { - //GenericParams m_params; - bool m_is_mut; TypeRef m_type; ExprPtr m_value; - //Literal m_value_res; + Literal m_value_res; }; struct Constant { + // NOTE: The generics can't influence the value of this `const` GenericParams m_params; TypeRef m_type; ExprPtr m_value; - //Literal m_value_res; + Literal m_value_res; }; struct Function { -- cgit v1.2.3