]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Do not require types uchar and int8 in dova profile
authorJürg Billeter <j@bitron.ch>
Sat, 13 Mar 2010 19:14:10 +0000 (20:14 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 13 Mar 2010 19:14:10 +0000 (20:14 +0100)
vala/valasemanticanalyzer.vala

index 8d6c77f4f2dc543f65024c69e82fea2a2dd5d39f..51b8906483f3518718531c94bbdc299d57312d5c 100644 (file)
@@ -159,16 +159,19 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                bool_type = new BooleanType ((Struct) root_symbol.scope.lookup ("bool"));
                string_type = new ObjectType ((Class) root_symbol.scope.lookup ("string"));
 
-               uchar_type = new IntegerType ((Struct) root_symbol.scope.lookup ("uchar"));
                short_type = new IntegerType ((Struct) root_symbol.scope.lookup ("short"));
                ushort_type = new IntegerType ((Struct) root_symbol.scope.lookup ("ushort"));
                int_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int"));
                uint_type = new IntegerType ((Struct) root_symbol.scope.lookup ("uint"));
                long_type = new IntegerType ((Struct) root_symbol.scope.lookup ("long"));
                ulong_type = new IntegerType ((Struct) root_symbol.scope.lookup ("ulong"));
-               int8_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int8"));
                double_type = new FloatingType ((Struct) root_symbol.scope.lookup ("double"));
 
+               if (context.profile != Profile.DOVA) {
+                       uchar_type = new IntegerType ((Struct) root_symbol.scope.lookup ("uchar"));
+                       int8_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int8"));
+               }
+
                var unichar_struct = (Struct) root_symbol.scope.lookup ("unichar");
                if (unichar_struct != null) {
                        unichar_type = new IntegerType (unichar_struct);
@@ -195,6 +198,11 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                        gvaluearray_type = new ObjectType ((Class) glib_ns.scope.lookup ("ValueArray"));
 
                        gerror_type = (Class) glib_ns.scope.lookup ("Error");
+               } else if (context.profile == Profile.DOVA) {
+                       var dova_ns = root_symbol.scope.lookup ("Dova");
+
+                       object_type = (Class) dova_ns.scope.lookup ("Object");
+                       type_type = new ObjectType ((Class) dova_ns.scope.lookup ("Type"));
                }
 
                current_symbol = root_symbol;