Skip to content
Permalink
Browse files

8238272: Eliminate cast_from_oop to narrowOop*

Improved low address computation in ObjArrayKlass::oop_oop_iterate_range.

Reviewed-by: tschatzl, sjohanss
  • Loading branch information
Kim Barrett
Kim Barrett committed Feb 12, 2020
1 parent eccdd8e commit 25c5a23695a8d900c2b8c5ad79d2b09c336467d5
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/hotspot/share/oops/objArrayKlass.inline.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, 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
@@ -101,7 +101,7 @@ void ObjArrayKlass::oop_oop_iterate_bounded(oop obj, OopClosureType* closure, Me
// for objArrayOops.
template <typename T, class OopClosureType>
void ObjArrayKlass::oop_oop_iterate_range(objArrayOop a, OopClosureType* closure, int start, int end) {
T* low = start == 0 ? cast_from_oop<T*>(a) : a->obj_at_addr_raw<T>(start);
T* low = (T*)a->base_raw() + start;
T* high = (T*)a->base_raw() + end;

oop_oop_iterate_elements_bounded<T>(a, closure, low, high);

0 comments on commit 25c5a23

Please sign in to comment.