mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8087133: Improve sharing of native wrappers in SignatureHandlerLibrary
Fingerprint normalization for arm32 Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
f65b2271ab
commit
bf69556039
3 changed files with 47 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, 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
|
||||
|
@ -63,6 +63,8 @@ class SignatureIterator: public ResourceObj {
|
|||
// Fingerprinter.
|
||||
enum {
|
||||
static_feature_size = 1,
|
||||
is_static_bit = 1,
|
||||
|
||||
result_feature_size = 4,
|
||||
result_feature_mask = 0xF,
|
||||
parameter_feature_size = 4,
|
||||
|
@ -114,6 +116,15 @@ class SignatureIterator: public ResourceObj {
|
|||
// Object types (begin indexes the first character of the entry, end indexes the first character after the entry)
|
||||
virtual void do_object(int begin, int end) = 0;
|
||||
virtual void do_array (int begin, int end) = 0;
|
||||
|
||||
static bool is_static(uint64_t fingerprint) {
|
||||
assert(fingerprint != (uint64_t)CONST64(-1), "invalid fingerprint");
|
||||
return fingerprint & is_static_bit;
|
||||
}
|
||||
static BasicType return_type(uint64_t fingerprint) {
|
||||
assert(fingerprint != (uint64_t)CONST64(-1), "invalid fingerprint");
|
||||
return (BasicType) ((fingerprint >> static_feature_size) & result_feature_mask);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue