mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8031820: NPG: Fix remaining references to metadata as oops in comments
8012125: Comments for ConstantPoolCache should reflect the addition of resolved_references in ConstantPool Updated comments in metadata header files, and renamed this_oop variables to this_cp or this_k when referring to constant pool or classes. Reviewed-by: stefank, jmasa
This commit is contained in:
parent
3c58faecfe
commit
472622d900
13 changed files with 308 additions and 416 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, 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,50 +40,15 @@
|
|||
|
||||
// A Method represents a Java method.
|
||||
//
|
||||
// Memory layout (each line represents a word). Note that most applications load thousands of methods,
|
||||
// so keeping the size of this structure small has a big impact on footprint.
|
||||
// Note that most applications load thousands of methods, so keeping the size of this
|
||||
// class small has a big impact on footprint.
|
||||
//
|
||||
// The actual bytecodes are inlined after the end of the Method struct.
|
||||
// Note that native_function and signature_handler have to be at fixed offsets
|
||||
// (required by the interpreter)
|
||||
//
|
||||
// There are bits in the access_flags telling whether inlined tables are present.
|
||||
// Note that accessing the line number and local variable tables is not performance critical at all.
|
||||
// Accessing the checked exceptions table is used by reflection, so we put that last to make access
|
||||
// to it fast.
|
||||
//
|
||||
// The line number table is compressed and inlined following the byte codes. It is found as the first
|
||||
// byte following the byte codes. The checked exceptions table and the local variable table are inlined
|
||||
// after the line number table, and indexed from the end of the method. We do not compress the checked
|
||||
// exceptions table since the average length is less than 2, and do not bother to compress the local
|
||||
// variable table either since it is mostly absent.
|
||||
//
|
||||
// Note that native_function and signature_handler has to be at fixed offsets (required by the interpreter)
|
||||
//
|
||||
// |------------------------------------------------------|
|
||||
// | header |
|
||||
// | klass |
|
||||
// |------------------------------------------------------|
|
||||
// | ConstMethod* (metadata) |
|
||||
// |------------------------------------------------------|
|
||||
// | MethodData* (metadata) |
|
||||
// | MethodCounters |
|
||||
// |------------------------------------------------------|
|
||||
// | access_flags |
|
||||
// | vtable_index |
|
||||
// |------------------------------------------------------|
|
||||
// | result_index (C++ interpreter only) |
|
||||
// |------------------------------------------------------|
|
||||
// | method_size | intrinsic_id | flags |
|
||||
// |------------------------------------------------------|
|
||||
// | code (pointer) |
|
||||
// | i2i (pointer) |
|
||||
// | adapter (pointer) |
|
||||
// | from_compiled_entry (pointer) |
|
||||
// | from_interpreted_entry (pointer) |
|
||||
// |------------------------------------------------------|
|
||||
// | native_function (present only if native) |
|
||||
// | signature_handler (present only if native) |
|
||||
// |------------------------------------------------------|
|
||||
|
||||
// Method embedded field layout (after declared fields):
|
||||
// [EMBEDDED native_function (present only if native) ]
|
||||
// [EMBEDDED signature_handler (present only if native) ]
|
||||
|
||||
class CheckedExceptionElement;
|
||||
class LocalVariableTableElement;
|
||||
|
@ -661,7 +626,7 @@ class Method : public Metadata {
|
|||
|
||||
// Static methods that are used to implement member methods where an exposed this pointer
|
||||
// is needed due to possible GCs
|
||||
static objArrayHandle resolved_checked_exceptions_impl(Method* this_oop, TRAPS);
|
||||
static objArrayHandle resolved_checked_exceptions_impl(Method* method, TRAPS);
|
||||
|
||||
// Returns the byte code index from the byte code pointer
|
||||
int bci_from(address bcp) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue