ulclassinit01 Sdiff src/share/vm/classfile (original) (raw)


33 #include "utilities/exceptions.hpp" 34 #include "utilities/growableArray.hpp" 35 36 // The verifier class 37 class Verifier : AllStatic { 38 public: 39 enum { 40 STRICTER_ACCESS_CTRL_CHECK_VERSION = 49, 41 STACKMAP_ATTRIBUTE_MAJOR_VERSION = 50, 42 INVOKEDYNAMIC_MAJOR_VERSION = 51, 43 NO_RELAX_ACCESS_CTRL_CHECK_VERSION = 52 44 }; 45 typedef enum { ThrowException, NoException } Mode; 46 47 /** 48 * Verify the bytecodes for a class. If 'throw_exception' is true 49 * then the appropriate VerifyError or ClassFormatError will be thrown. 50 * Otherwise, no exception is thrown and the return indicates the 51 * error. 52 */

53 static bool verify(instanceKlassHandle klass, Mode mode, bool should_verify_class, TRAPS); 54 55 // Return false if the class is loaded by the bootstrap loader, 56 // or if defineClass was called requesting skipping verification 57 // -Xverify:all/none override this value 58 static bool should_verify_for(oop class_loader, bool should_verify_class); 59 60 // Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2. 61 static bool relax_verify_for(oop class_loader); 62 63 // Print output for -XX:+TraceClassResolution 64 static void trace_class_resolution(Klass* resolve_class, InstanceKlass* verify_class); 65 66 private: 67 static bool is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class); 68 static Symbol* inference_verify( 69 instanceKlassHandle klass, char* msg, size_t msg_len, TRAPS); 70 }; 71 72 class RawBytecodeStream;



33 #include "utilities/exceptions.hpp" 34 #include "utilities/growableArray.hpp" 35 36 // The verifier class 37 class Verifier : AllStatic { 38 public: 39 enum { 40 STRICTER_ACCESS_CTRL_CHECK_VERSION = 49, 41 STACKMAP_ATTRIBUTE_MAJOR_VERSION = 50, 42 INVOKEDYNAMIC_MAJOR_VERSION = 51, 43 NO_RELAX_ACCESS_CTRL_CHECK_VERSION = 52 44 }; 45 typedef enum { ThrowException, NoException } Mode; 46 47 /** 48 * Verify the bytecodes for a class. If 'throw_exception' is true 49 * then the appropriate VerifyError or ClassFormatError will be thrown. 50 * Otherwise, no exception is thrown and the return indicates the 51 * error. 52 / 53 static void log_end_verification(outputStream st, const char* klassName, Symbol* exception_name, TRAPS); 54 static bool verify(instanceKlassHandle klass, Mode mode, bool should_verify_class, TRAPS); 55 56 // Return false if the class is loaded by the bootstrap loader, 57 // or if defineClass was called requesting skipping verification 58 // -Xverify:all/none override this value 59 static bool should_verify_for(oop class_loader, bool should_verify_class); 60 61 // Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2. 62 static bool relax_verify_for(oop class_loader); 63 64 // Print output for -XX:+TraceClassResolution 65 static void trace_class_resolution(Klass* resolve_class, InstanceKlass* verify_class); 66 67 private: 68 static bool is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class); 69 static Symbol* inference_verify( 70 instanceKlassHandle klass, char* msg, size_t msg_len, TRAPS); 71 }; 72 73 class RawBytecodeStream;