Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8238272: Eliminate cast_from_oop to narrowOop*
Browse files Browse the repository at this point in the history
Improved low address computation in ObjArrayKlass::oop_oop_iterate_range.

Reviewed-by: tschatzl, sjohanss
  • Loading branch information
Kim Barrett committed Feb 12, 2020
1 parent eccdd8e commit 25c5a23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 25c5a23

Please sign in to comment.