Skip to content

Commit

Permalink
Merge pull request #1698 from donc/ctfe_removevsave
Browse files Browse the repository at this point in the history
CTFE: Slightly reduce memory usage
  • Loading branch information
braddr committed Feb 27, 2013
2 parents 709d575 + ab6be70 commit 7245d11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/interpret.c
Expand Up @@ -307,7 +307,6 @@ Expression *FuncDeclaration::interpret(InterState *istate, Expressions *argument
istatex.localThis = thisarg;
istatex.framepointer = ctfeStack.startFrame();

Expressions vsave; // place to save previous parameter values
size_t dim = 0;
if (needThis() && !thisarg)
{ // error, no this. Prevent segfault.
Expand All @@ -324,7 +323,6 @@ Expression *FuncDeclaration::interpret(InterState *istate, Expressions *argument
{
dim = arguments->dim;
assert(!dim || (parameters && (parameters->dim == dim)));
vsave.setDim(dim);

/* Evaluate all the arguments to the function,
* store the results in eargs[]
Expand Down Expand Up @@ -3949,7 +3947,7 @@ Expression *CallExp::interpret(InterState *istate, CtfeGoal goal)

TypeFunction *tf = fd ? (TypeFunction *)(fd->type) : NULL;
if (!tf)
{ // DAC: This should never happen, it's an internal compiler error.
{ // This should never happen, it's an internal compiler error.
//printf("ecall=%s %d %d\n", ecall->toChars(), ecall->op, TOKcall);
if (ecall->op == TOKidentifier)
error("cannot evaluate %s at compile time. Circular reference?", toChars());
Expand Down

0 comments on commit 7245d11

Please sign in to comment.