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

V0047: The reference is retrieved twice

The specification states:

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

IE11 Mode and EdgeHTML Mode (All versions)

Between steps 3 and 4 the following steps are added:

    a. If Type(lhs) is a Reference and if IsUnresolvableReference(_lhs_) is false and IsPropertyReference(_lhs_) is false:

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

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

       3.  ReturnIfAbrupt(lhs);

This retrieves the reference twice.