DescriptionRenamed Operator.IDENTITY to Operator.TO_NUMBER.
There is only one use, since the parser looks up operators by symbol,
and the only other code that uses the name IDENTITY is in the pending
array optimization branch.
From http://code.google.com/p/google-caja/issues/detail?id=880
The unary + operator is represented in the Operator enum by IDENTITY.
This operator does not act as the identity function. ES3 Chapter
11.4.6 defines the operator as applying the primitive ToNumber
operation to its operand and yielding the result:
11.4.6 Unary + Operator
The unary + operator converts its operand to Number type. The
production UnaryExpression : + UnaryExpression is evaluated as
follows:
1. Evaluate UnaryExpression.
2. Call GetValue(Result(1)).
3. Call ToNumber(Result(2)).
4. Return Result(3).
Patch Set 1 #
MessagesTotal messages: 3
|
|||||||||||||||||||