Skip to content

Commit

Permalink
CTFE speedup: more unnecessary resolveSlice
Browse files Browse the repository at this point in the history
Two more cases where slices were being resolved, as a workaround
for a ctfeEquals limitation which has since been fixed.
  • Loading branch information
don-clugston-sociomantic committed Oct 29, 2012
1 parent 0b19850 commit cd56251
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/interpret.c
Expand Up @@ -1094,8 +1094,6 @@ Expression *SwitchStatement::interpret(InterState *istate)
Expression *econdition = condition->interpret(istate);
if (exceptionOrCantInterpret(econdition))
return econdition;
if (econdition->op == TOKslice)
econdition = resolveSlice(econdition);

Statement *s = NULL;
if (cases)
Expand Down Expand Up @@ -2013,8 +2011,6 @@ Expression *AssocArrayLiteralExp::interpret(InterState *istate, CtfeGoal goal)
*/
for (size_t i = 1; i < keysx->dim; i++)
{ Expression *ekey = keysx->tdata()[i - 1];
if (ekey->op == TOKslice)
ekey = resolveSlice(ekey);
for (size_t j = i; j < keysx->dim; j++)
{ Expression *ekey2 = keysx->tdata()[j];
Expression *ex = ctfeEqual(loc, TOKequal, Type::tbool, ekey, ekey2);
Expand Down

0 comments on commit cd56251

Please sign in to comment.