2.1.21 [ECMA-262/6] Section Runtime Semantics: Evaluation

V0050: The reference is retrieved twice

The specification states: Runtime Semantics: Evaluation
     UnaryExpression : -- UnaryExpression
         1.  Let expr be the result of evaluating UnaryExpression.
         2.  Let oldValue be ToNumber(GetValue(expr)).
         3.  ReturnIfAbrupt(oldValue).
         4.  Let newValue be the result of subtracting the value 1 from oldValue, using 
             the same rules as for the - operator (see 12.7.5).
         5.  Let status be PutValue(expr, newValue).
         6.  ReturnIfAbrupt(status).
         7.  Return newValue.

IE11 Mode and EdgeHTML Mode (All versions)

Between steps 3 and 4 the following steps are added:

    a. If Type(expr) is Reference and if IsUnresolvableReference(_expr_) is false and IsPropertyReference(_expr_) is false then

       1.  Assert: expr is a reference to an Environment Record.

       2.  Let expr be the result of evaluating an Identifier _id_ whose StringValue is GetReferencedName(expr) as if _id_ were a LeftHandSideExpression.

       3.  ReturnIfAbrupt(expr);

As a result the reference is retrieved twice.