1.1 --- a/src/Types.cpp Sat Nov 17 23:13:39 2012 -0800
1.2 +++ b/src/Types.cpp Sun Nov 18 14:53:23 2012 -0800
1.3 @@ -63,6 +63,13 @@
1.4 ArrayType *
1.5 ArrayType::New(Zone *zone, Handle<Type> contained, int elements)
1.6 {
1.7 + if (contained->isArray() &&
1.8 + ArrayType::cast(contained)->levels() == MAX_ARRAY_DEPTH)
1.9 + {
1.10 + zone->reportError(Message_MaximumArrayDepth);
1.11 + return NULL;
1.12 + }
1.13 +
1.14 Local<ArrayType> type(zone, ArrayType::cast(zone->allocate(MapKind_ArrayType, sizeof(ArrayType), Heap::Tenure_Old)));
1.15 if (!type)
1.16 return NULL;
1.17 @@ -201,7 +208,6 @@
1.18 }
1.19 }
1.20
1.21 -
1.22 StructType *
1.23 StructType::New(Zone *zone, Handle<String> name, Handle<FixedArray> fields)
1.24 {