< prev index next >


Print this page
rev 13049 : imported patch 8181377_unsafe_u2

@@ -73,10 +73,13 @@
   enum { LegalClass, LegalField, LegalMethod }; // used to verify unqualified names
+  // Potentially unaligned pointer to various 16-bit entries in the class file
+  typedef void unsafe_u2;
   const ClassFileStream* _stream; // Actual input stream
   const Symbol* _requested_name;
   Symbol* _class_name;
   mutable ClassLoaderData* _loader_data;
   const InstanceKlass* _host_klass;

@@ -240,29 +243,29 @@
                      AccessFlags* const promoted_flags,
                      bool* const has_final_method,
                      bool* const declares_nonstatic_concrete_methods,
-  const void* parse_exception_table(const ClassFileStream* const stream,
+  const unsafe_u2* parse_exception_table(const ClassFileStream* const stream,
                                     u4 code_length,
                                     u4 exception_table_length,
   void parse_linenumber_table(u4 code_attribute_length,
                               u4 code_length,
                               CompressedLineNumberWriteStream**const write_stream,
-  const void* parse_localvariable_table(const ClassFileStream* const cfs,
+  const unsafe_u2* parse_localvariable_table(const ClassFileStream* const cfs,
                                         u4 code_length,
                                         u2 max_locals,
                                         u4 code_attribute_length,
                                         u2* const localvariable_table_length,
                                         bool isLVTT,
-  const void* parse_checked_exceptions(const ClassFileStream* const cfs,
+  const unsafe_u2* parse_checked_exceptions(const ClassFileStream* const cfs,
                                        u2* const checked_exceptions_length,
                                        u4 method_attribute_length,
   void parse_type_array(u2 array_length,

@@ -460,14 +463,14 @@
   void copy_localvariable_table(const ConstMethod* cm,
                                 int lvt_cnt,
                                 u2* const localvariable_table_length,
-                                const void** const localvariable_table_start,
+                                const unsafe_u2** const localvariable_table_start,
                                 int lvtt_cnt,
                                 u2* const localvariable_type_table_length,
-                                const void** const localvariable_type_table_start,
+                                const unsafe_u2** const localvariable_type_table_start,
   void copy_method_annotations(ConstMethod* cm,
                                const u1* runtime_visible_annotations,
                                int runtime_visible_annotations_length,
< prev index next >