8230199: consolidate signature parsing code in HotSpot sources

Add a new Signature class to support basic signature queries and enhance SignatureStream class to parse field signatures in addition to methods.

Co-authored-by: John Rose <john.r.rose@oracle.com>
Reviewed-by: coleenp, dholmes, fparain, hseigel
This commit is contained in:
Lois Foltan 2020-02-06 14:29:57 +00:00
parent 2ede36b3a3
commit d19a396e96
57 changed files with 1394 additions and 1498 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
@ -901,8 +901,7 @@ static Method* new_method(
m->set_constants(NULL); // This will get filled in later
m->set_name_index(cp->utf8(name));
m->set_signature_index(cp->utf8(sig));
ResultTypeFinder rtf(sig);
m->constMethod()->set_result_type(rtf.type());
m->compute_from_signature(sig);
m->set_size_of_parameters(params);
m->set_max_stack(max_stack);
m->set_max_locals(params);