From 89f6fc3b4aff9415418517fe11cbb23b311d4b98 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 12 Jun 2009 23:42:47 -0400 Subject: [PATCH] compile: clean class PrimitiveInfo Signed-off-by: Jean Privat --- src/compiling/compiling_base.nit | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/compiling/compiling_base.nit b/src/compiling/compiling_base.nit index cdc9d6d..20aa0b5 100644 --- a/src/compiling/compiling_base.nit +++ b/src/compiling/compiling_base.nit @@ -207,10 +207,7 @@ redef class MMLocalClass var cnames = ["bigint", "char", "int", "float", "char *", "val_t *", "void *"] for i in [0..pnames.length[ do var n = pnames[i].to_symbol - var pi = new PrimitiveInfo - pi.name = n - pi.tagged = tagged[i] - pi.cname = cnames[i] + var pi = new PrimitiveInfo(n, tagged[i], cnames[i]) res[n] = pi end return res @@ -220,15 +217,20 @@ end # Information about a primitive class class PrimitiveInfo # The name of the class - readable writable attr _name: Symbol + readable attr _name: Symbol # Is the class tagged (aka not boxed) - readable writable attr _tagged: Bool + readable attr _tagged: Bool # The corresponding c type for the primitive value - readable writable attr _cname: String + readable attr _cname: String - private init do end + private init(n: Symbol, t: Bool, c: String) + do + _name = n + _tagged = t + _cname = c + end end redef class MMType -- 1.7.9.5