mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8196199: Remove miscellaneous oop comparison operators
Co-authored-by: Kim Barrett <kim.barrett@oracle.com> Reviewed-by: hseigel, lfoltan
This commit is contained in:
parent
2b3d492b43
commit
aa51ac19b3
7 changed files with 48 additions and 39 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue