/* * Copyright (c) 1997, 2021, 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. *
*/
Bytecodes::Code bc = invoke_code(); return LinkResolver::resolve_method_statically(bc, constants, index(), THREAD);
}
int Bytecode_member_ref::index() const { // Note: Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4, // at the same time it allocates per-call-site CP cache entries.
Bytecodes::Code rawc = code(); if (has_index_u4(rawc)) return get_index_u4(rawc); else return get_index_u2_cpcache(rawc);
}
int Bytecode_member_ref::pool_index() const { return cpcache_entry()->constant_pool_index();
}
ConstantPoolCacheEntry* Bytecode_member_ref::cpcache_entry() const { int index = this->index(); return cpcache()->entry_at(ConstantPool::decode_cpcache_index(index, true));
}
int Bytecode_loadconstant::pool_index() const { int index = raw_index(); if (has_cache_index()) { return _method->constants()->object_to_cp_index(index);
} return index;
}
BasicType Bytecode_loadconstant::result_type() const { int index = pool_index(); return _method->constants()->basic_type_for_constant_at(index);
}
void Bytecode_lookupswitch::verify() const { switch (Bytecodes::java_code(code())) { case Bytecodes::_lookupswitch:
{ int i = number_of_pairs() - 1; while (i-- > 0) {
assert(pair_at(i).match() < pair_at(i+1).match(), "unsorted table entries");
}
} break; default:
fatal("not a lookupswitch bytecode");
}
}
void Bytecode_tableswitch::verify() const { switch (Bytecodes::java_code(code())) { case Bytecodes::_tableswitch:
{ int lo = low_key(); int hi = high_key();
assert (hi >= lo, "incorrect hi/lo values in tableswitch"); int i = hi - lo - 1 ; while (i-- > 0) { // no special check needed
}
} break; default:
fatal("not a tableswitch bytecode");
}
}
#endif
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
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.