public Expression longToIntForHashCode ( Expression ref1 , Expression ref2 , ASTNode source ) { int pS = source . sourceStart , pE = source . sourceEnd ; /* (int)(ref >>> 32 ^ ref) */ IntLiteral int32 = makeIntLiteral ( "32" . toCharArray ( ) , source ) ; BinaryExpression higherBits = new BinaryExpression ( ref1 , int32 , OperatorIds . UNSIGNED_RIGHT_SHIFT ) ; setGeneratedBy ( higherBits , source ) ; BinaryExpression xorParts = new BinaryExpression ( ref2 , higherBits , OperatorIds . XOR ) ; setGeneratedBy ( xorParts , source ) ; TypeReference intRef = TypeReference . baseTypeReference ( TypeIds . T_int , 0 ) ; intRef . sourceStart = pS ; intRef . sourceEnd = pE ; setGeneratedBy ( intRef , source ) ; CastExpression expr = makeCastExpression ( xorParts , intRef , source ) ; expr . sourceStart = pS ; expr . sourceEnd = pE ; return expr ; }
Give 2 clones!