25
#include "precompiled.hpp"
26
#include "classfile/classFileParser.hpp"
27
#include "classfile/stackMapTable.hpp"
28
#include "classfile/verifier.hpp"
29
#include "classfile/vmSymbols.hpp"
30
#include "memory/resourceArea.hpp"
35
PRAGMA_FORMAT_NONLITERAL_IGNORED
37
void ClassFileParser::classfile_parse_error(const char* msg, TRAPS) const {
38
assert(_class_name != nullptr, "invariant");
39
ResourceMark rm(THREAD);
40
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
41
msg, _class_name->as_C_string());
44
void ClassFileParser::classfile_parse_error(const char* msg,
47
assert(_class_name != nullptr, "invariant");
48
ResourceMark rm(THREAD);
49
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
50
msg, index, _class_name->as_C_string());
53
void ClassFileParser::classfile_parse_error(const char* msg,
56
assert(_class_name != nullptr, "invariant");
57
ResourceMark rm(THREAD);
58
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
59
msg, name, _class_name->as_C_string());
62
void ClassFileParser::classfile_parse_error(const char* msg,
66
assert(_class_name != nullptr, "invariant");
67
ResourceMark rm(THREAD);
68
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
69
msg, index, name, _class_name->as_C_string());
72
void ClassFileParser::classfile_parse_error(const char* msg,
74
const char* signature,
76
assert(_class_name != nullptr, "invariant");
77
ResourceMark rm(THREAD);
78
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_ClassFormatError(),
79
msg, name, signature, _class_name->as_C_string());
82
void ClassFileParser::classfile_icce_error(const char* msg,
85
assert(_class_name != nullptr, "invariant");
86
ResourceMark rm(THREAD);
87
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_IncompatibleClassChangeError(),
88
msg, _class_name->as_klass_external_name(), k->external_name());
91
void ClassFileParser::classfile_ucve_error(const char* msg,
92
const Symbol* class_name,
96
ResourceMark rm(THREAD);
97
Exceptions::fthrow(THREAD_AND_LOCATION, vmSymbols::java_lang_UnsupportedClassVersionError(),
98
msg, class_name->as_C_string(), major, minor);
103
void StackMapStream::stackmap_format_error(const char* msg, TRAPS) {
104
ResourceMark rm(THREAD);
107
vmSymbols::java_lang_ClassFormatError(),
108
"StackMapTable format error: %s", msg