[lworld] [Rev 01] RFR: 8244810: [lworld] Decommission arrayStorageProperties from Klass:array_klass() et el

Frederic Parain fparain at openjdk.java.net
Wed May 13 16:23:24 UTC 2020


On Wed, 13 May 2020 09:54:31 GMT, David Simms <dsimms at openjdk.org> wrote:

>> First part of LW2 to LW3 arrays
>
> David Simms has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Copyright syntax

Looks like a good start to remove `ArrayStorageProperties`.
My only strong concern is in `oopFactory.cpp` (see inline comment).

Fred

src/hotspot/share/memory/oopFactory.cpp line 155:

> 154:   ValueArrayKlass* vak = ValueArrayKlass::cast(array->klass());
> 155:   objArrayHandle oarray = new_objArray_handle(vak->element_klass()->super(),
> 156:                                               array->length(), CHECK_(objArrayHandle()));

With the evolving model, it is not guaranteed that the direct super type will be an inline type, it might be safer to
create an `Object[]` instead.

src/hotspot/share/oops/arrayStorageProperties.hpp line 2:

> 1: /*
> 2:  * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
> 3:  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

(Comment for the whole file)
I understand this is the first stage of a set of complex changes to remove the `ArrayStorageProperties` code, but
cleaning up the `ArrayStorageProperties` as things are getting removed might help to see progress (and would make
reviews easier). For instance:
  - `clear_flattened()`
  - `set_flattened()`
  - `set_null_free()`
  - `for_signature(Symbol* sig)`
seem to not be used anymore and could be removed.

-------------

PR: https://git.openjdk.java.net/valhalla/pull/44



More information about the valhalla-dev mailing list