jitcraft/Types.cpp
changeset 21 af5d8e985502
parent 14 0784ac5cc347
child 25 23e8b3d8e4e6
     1.1 --- a/jitcraft/Types.cpp	Sun Jul 01 11:25:36 2012 -0700
     1.2 +++ b/jitcraft/Types.cpp	Sun Jul 01 14:52:57 2012 -0700
     1.3 @@ -35,6 +35,8 @@
     1.4  
     1.5      if (tag && strcmp(tag, "Float") == 0)
     1.6          type->primitive_ = PrimitiveType_Float;
     1.7 +    else if (tag && strcmp(tag, "String") == 0)
     1.8 +        type->primitive_ = PrimitiveType_Char;
     1.9      else
    1.10          type->primitive_ = PrimitiveType_Int32;
    1.11      return type;
    1.12 @@ -56,7 +58,7 @@
    1.13  }
    1.14  
    1.15  Type *
    1.16 -Type::NewUnsafeArray(Zone *zone, Type *contained, int elements)
    1.17 +Type::NewArray(Zone *zone, Type *contained, int elements, bool isConst)
    1.18  {
    1.19      Object *obj = zone->allocate(MapKind_Type, sizeof(Type), Heap::Tenure_Old);
    1.20      if (!obj)
    1.21 @@ -71,6 +73,7 @@
    1.22          type->levels_ = 1;
    1.23      else
    1.24          type->levels_ = contained->levels() + 1;
    1.25 +    type->const_ = isConst;
    1.26      return type;
    1.27  }
    1.28