8196199: Remove miscellaneous oop comparison operators

Co-authored-by: Kim Barrett <kim.barrett@oracle.com>
Reviewed-by: hseigel, lfoltan
This commit is contained in:
Coleen Phillimore 2018-02-01 13:30:53 -05:00
parent 2b3d492b43
commit aa51ac19b3
7 changed files with 48 additions and 39 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -172,9 +172,8 @@ void ObjectLookup::maybe_resort() {
}
int ObjectLookup::sort_by_address(oop a, oop b) {
if (b > a) return 1;
if (a > b) return -1;
return 0;
// oopDesc::compare returns the opposite of what this function returned
return -(oopDesc::compare(a, b));
}
int ObjectLookup::sort_by_address(ObjectEntry* a, ObjectEntry* b) {