8282130: (bf) Remove unused ARRAY_BASE_OFFSET, ARRAY_INDEX_SCALE from read-only Heap Buffers

Reviewed-by: bpb, alanb
This commit is contained in:
Andrey Turbanov 2022-02-21 09:03:16 +00:00
parent 34aae32de6
commit 51f4420711

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2022, 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
@ -40,10 +40,10 @@ import jdk.internal.access.foreign.MemorySegmentProxy;
* instance of this class rather than of the superclass.
#end[rw]
*/
class Heap$Type$Buffer$RW$
extends {#if[ro]?Heap}$Type$Buffer
{
#if[rw]
// Cached array base offset
private static final long ARRAY_BASE_OFFSET = UNSAFE.arrayBaseOffset($type$[].class);
@ -53,11 +53,10 @@ class Heap$Type$Buffer$RW$
// For speed these fields are actually declared in X-Buffer;
// these declarations are here as documentation
/*
#if[rw]
protected final $type$[] hb;
protected final int offset;
#end[rw]
*/
#end[rw]
Heap$Type$Buffer$RW$(int cap, int lim, MemorySegmentProxy segment) { // package-private
#if[rw]