Mercurial > projects > ldc
comparison dmd2/interpret.c @ 1526:54b3c1394d62
Merged dmdfe 2.031.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Tue, 07 Jul 2009 02:26:11 +0100 |
parents | 638d16625da2 |
children | e4f7b5d9c68a |
comparison
equal
deleted
inserted
replaced
1525:d28cd7c45267 | 1526:54b3c1394d62 |
---|---|
2291 return NULL; | 2291 return NULL; |
2292 if (earg->op != TOKassocarrayliteral) | 2292 if (earg->op != TOKassocarrayliteral) |
2293 return NULL; | 2293 return NULL; |
2294 AssocArrayLiteralExp *aae = (AssocArrayLiteralExp *)earg; | 2294 AssocArrayLiteralExp *aae = (AssocArrayLiteralExp *)earg; |
2295 Expression *e = new ArrayLiteralExp(aae->loc, aae->keys); | 2295 Expression *e = new ArrayLiteralExp(aae->loc, aae->keys); |
2296 Type *elemType = ((TypeAArray *)aae->type)->index; | |
2297 e->type = new TypeSArray(elemType, new IntegerExp(arguments ? arguments->dim : 0)); | |
2296 return e; | 2298 return e; |
2297 } | 2299 } |
2298 | 2300 |
2299 Expression *interpret_aaValues(InterState *istate, Expressions *arguments) | 2301 Expression *interpret_aaValues(InterState *istate, Expressions *arguments) |
2300 { | 2302 { |
2307 return NULL; | 2309 return NULL; |
2308 if (earg->op != TOKassocarrayliteral) | 2310 if (earg->op != TOKassocarrayliteral) |
2309 return NULL; | 2311 return NULL; |
2310 AssocArrayLiteralExp *aae = (AssocArrayLiteralExp *)earg; | 2312 AssocArrayLiteralExp *aae = (AssocArrayLiteralExp *)earg; |
2311 Expression *e = new ArrayLiteralExp(aae->loc, aae->values); | 2313 Expression *e = new ArrayLiteralExp(aae->loc, aae->values); |
2314 Type *elemType = ((TypeAArray *)aae->type)->next; | |
2315 e->type = new TypeSArray(elemType, new IntegerExp(arguments ? arguments->dim : 0)); | |
2312 //printf("result is %s\n", e->toChars()); | 2316 //printf("result is %s\n", e->toChars()); |
2313 return e; | 2317 return e; |
2314 } | 2318 } |
2315 | 2319 |