author | coleenp |
Wed, 13 Nov 2019 08:23:23 -0500 | |
changeset 59056 | 15936b142f86 |
permissions | -rw-r--r-- |
59056
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
1 |
/* |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
2 |
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
4 |
* |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
8 |
* |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
13 |
* accompanied this code). |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
14 |
* |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
18 |
* |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
21 |
* questions. |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
22 |
* |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
23 |
*/ |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
24 |
|
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
25 |
#ifndef SHARE_OOPS_FIELDSTREAMS_INLINE_HPP |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
26 |
#define SHARE_OOPS_FIELDSTREAMS_INLINE_HPP |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
27 |
|
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
28 |
#include "oops/fieldStreams.hpp" |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
29 |
#include "runtime/thread.inline.hpp" |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
30 |
|
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
31 |
FieldStreamBase::FieldStreamBase(Array<u2>* fields, ConstantPool* constants, int start, int limit) : _fields(fields), |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
32 |
_constants(constantPoolHandle(Thread::current(), constants)), _index(start) { |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
33 |
_index = start; |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
34 |
int num_fields = init_generic_signature_start_slot(); |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
35 |
if (limit < start) { |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
36 |
_limit = num_fields; |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
37 |
} else { |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
38 |
_limit = limit; |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
39 |
} |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
40 |
} |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
41 |
|
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
42 |
FieldStreamBase::FieldStreamBase(Array<u2>* fields, ConstantPool* constants) : _fields(fields), |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
43 |
_constants(constantPoolHandle(Thread::current(), constants)), _index(0) { |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
44 |
_limit = init_generic_signature_start_slot(); |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
45 |
} |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
46 |
|
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
47 |
FieldStreamBase::FieldStreamBase(InstanceKlass* klass) : _fields(klass->fields()), |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
48 |
_constants(constantPoolHandle(Thread::current(), klass->constants())), _index(0), |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
49 |
_limit(klass->java_fields_count()) { |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
50 |
init_generic_signature_start_slot(); |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
51 |
assert(klass == field_holder(), ""); |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
52 |
} |
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
53 |
|
15936b142f86
8233913: Remove implicit conversion from Method* to methodHandle
coleenp
parents:
diff
changeset
|
54 |
#endif // SHARE_OOPS_FIELDSTREAMS_INLINE_HPP |