comparison dmd/SliceExp.d @ 126:1765f3ef917d

ClassDeclarations, Arguments -> Vector
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Fri, 03 Sep 2010 23:25:55 +0100
parents e28b18c23469
children 60bb0fe4563e
comparison
equal deleted inserted replaced
125:767a01c2a272 126:1765f3ef917d
221 } 221 }
222 e = new TupleExp(loc, exps); 222 e = new TupleExp(loc, exps);
223 } 223 }
224 else 224 else
225 { 225 {
226 Arguments args = new Arguments; 226 auto args = new Arguments;
227 args.reserve(j2 - j1); 227 args.reserve(j2 - j1);
228 for (size_t i = j1; i < j2; i++) 228 for (size_t i = j1; i < j2; i++)
229 { 229 {
230 Argument arg = Argument.getNth(tup.arguments, i); 230 auto arg = Argument.getNth(tup.arguments, i);
231 args.push(cast(void*)arg); 231 args.push(arg);
232 } 232 }
233 e = new TypeExp(e1.loc, new TypeTuple(args)); 233 e = new TypeExp(e1.loc, new TypeTuple(args));
234 } 234 }
235 e = e.semantic(sc); 235 e = e.semantic(sc);
236 } 236 }
510 } 510 }
511 511
512 override Expression buildArrayLoop(Arguments fparams) 512 override Expression buildArrayLoop(Arguments fparams)
513 { 513 {
514 Identifier id = Identifier.generateId("p", fparams.dim); 514 Identifier id = Identifier.generateId("p", fparams.dim);
515 Argument param = new Argument(STCconst, type, id, null); 515 auto param = new Argument(STCconst, type, id, null);
516 fparams.shift(cast(void*)param); 516 fparams.shift(param);
517 Expression e = new IdentifierExp(Loc(0), id); 517 Expression e = new IdentifierExp(Loc(0), id);
518 Expressions arguments = new Expressions(); 518 Expressions arguments = new Expressions();
519 Expression index = new IdentifierExp(Loc(0), Id.p); 519 Expression index = new IdentifierExp(Loc(0), Id.p);
520 arguments.push(index); 520 arguments.push(index);
521 e = new ArrayExp(Loc(0), e, arguments); 521 e = new ArrayExp(Loc(0), e, arguments);