/* * Copyright (c) 1997, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// special handling of oop constants:
_fast_aldc ,
_fast_aldc_w ,
_return_register_finalizer ,
// special handling of signature-polymorphic methods:
_invokehandle ,
// These bytecodes are rewritten at CDS dump time, so that we can prevent them from being // rewritten at run time. This way, the ConstMethods can be placed in the CDS ReadOnly // section, and RewriteByteCodes/RewriteFrequentPairs can rewrite non-CDS bytecodes // at run time. // // Rewritten at CDS dump time to | Original bytecode // _invoke_virtual rewritten on sparc, will be disabled if UseSharedSpaces turned on. // ------------------------------+------------------
_nofast_getfield , // <- _getfield
_nofast_putfield , // <- _putfield
_nofast_aload_0 , // <- _aload_0
_nofast_iload , // <- _iload
_shouldnotreachhere , // For debugging
number_of_codes
};
// Flag bits derived from format strings, can_trap, can_rewrite, etc.: enum Flags { // semantic flags:
_bc_can_trap = 1<<0, // bytecode execution can trap or block
_bc_can_rewrite = 1<<1, // bytecode execution has an alternate form
// format bits (determined only by the format string):
_fmt_has_c = 1<<2, // constant, such as sipush "bcc"
_fmt_has_j = 1<<3, // constant pool cache index, such as getfield "bjj"
_fmt_has_k = 1<<4, // constant pool index, such as ldc "bk"
_fmt_has_i = 1<<5, // local index, such as iload
_fmt_has_o = 1<<6, // offset, such as ifeq
_fmt_has_nbo = 1<<7, // contains native-order field(s)
_fmt_has_u2 = 1<<8, // contains double-byte field(s)
_fmt_has_u4 = 1<<9, // contains quad-byte field
_fmt_not_variable = 1<<10, // not of variable length (simple or wide)
_fmt_not_simple = 1<<11, // either wide or variable length
_all_fmt_bits = (_fmt_not_simple*2 - _fmt_has_c),
// Fetch a bytecode, hiding breakpoints as necessary. The method // argument is used for conversion of breakpoints into the original // bytecode. The CI uses these methods but guarantees that // breakpoints are hidden so the method argument should be passed as // NULL since in that case the bcp and Method* are unrelated // memory. static Code code_at(const Method* method, address bcp) {
assert(method == NULL || check_method(method, bcp), "bcp must point into method");
Code code = cast(*bcp);
assert(code != _breakpoint || method != NULL, "need Method* to decode breakpoint"); return (code != _breakpoint) ? code : non_breakpoint_code_at(method, bcp);
} static Code java_code_at(const Method* method, address bcp) { return java_code(code_at(method, bcp));
}
// Fetch a bytecode or a breakpoint: static Code code_or_bp_at(address bcp) { return (Code)cast(*bcp); }
static Code code_at(Method* method, int bci);
// find a bytecode, behind a breakpoint if necessary: static Code non_breakpoint_code_at(const Method* method, address bcp);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.