harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r546915 [2/5] - in /harmony/enhanced/drlvm/trunk: src/test/regression/H3225/ vm/vmcore/include/ vm/vmcore/src/class_support/ vm/vmcore/src/verifier/
Date Wed, 13 Jun 2007 15:17:11 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp?view=diff&rev=546915&r1=546914&r2=546915
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier/Verifier.cpp Wed Jun 13 08:17:09 2007
@@ -34,13 +34,13 @@
  * Parses bytecode, determines instruction boundaries and 
  * provides checks of simple verifications.
  */
-static vf_Result vf_parse_bytecode( vf_Context *ctx );  // verification context
+static vf_Result vf_parse_bytecode(vf_Context *ctx);    // verification context
 
 #if _VF_DEBUG
 /**
  * Prints code instruction array in stream.
  */
-void vf_dump_bytecode( vf_ContextHandle );      // verification context
+void vf_dump_bytecode(vf_ContextHandle);        // verification context
 
 /**
  * Array of opcode names. Available in debug mode.
@@ -87,46 +87,45 @@
 /** 
  * Provides method bytecode verifications.
  */
-static vf_Result
-vf_verify_method_bytecode( vf_Context *ctx )    // verification context
+static vf_Result vf_verify_method_bytecode(vf_Context *ctx)     // verification context
 {
-    VF_TRACE( "method", VF_REPORT_CTX( ctx ) << "verifying method" );
+    VF_TRACE("method", VF_REPORT_CTX(ctx) << "verifying method");
 
     // set method for type pool
-    ctx->m_type->SetMethod( ctx );
+    ctx->m_type->SetMethod(ctx);
 
     // parse method descriptor
-    vf_parse_description( ctx->m_descriptor, &ctx->m_method_inlen,
-                          &ctx->m_method_outlen );
-    vf_set_description_vector( ctx->m_descriptor, ctx->m_method_inlen, 0,
-                               ctx->m_method_outlen, &ctx->m_method_invector,
-                               &ctx->m_method_outvector, ctx );
+    vf_parse_description(ctx->m_descriptor, &ctx->m_method_inlen,
+                         &ctx->m_method_outlen);
+    vf_set_description_vector(ctx->m_descriptor, ctx->m_method_inlen, 0,
+                              ctx->m_method_outlen, &ctx->m_method_invector,
+                              &ctx->m_method_outvector, ctx);
 
     // parse bytecode, fill instruction instr
-    vf_Result result = vf_parse_bytecode( ctx );
-    if( VER_OK != result ) {
+    vf_Result result = vf_parse_bytecode(ctx);
+    if (VF_OK != result) {
         goto labelEnd_verifyClassBytecode;
     }
     // build a control flow graph
-    result = vf_create_graph( ctx );
-    if( VER_OK != result ) {
+    result = vf_create_graph(ctx);
+    if (VF_OK != result) {
         goto labelEnd_verifyClassBytecode;
     }
 
-    result = vf_check_graph( ctx );
-    if( VER_OK != result ) {
+    result = vf_check_graph(ctx);
+    if (VF_OK != result) {
         goto labelEnd_verifyClassBytecode;
     }
 
   labelEnd_verifyClassBytecode:
 
-    VF_TRACE( "method", VF_REPORT_CTX( ctx ) << "method statistics: "
-              << " rets: " << ctx->m_retnum
-              << ", length: " << ctx->m_len
-              << ", handlers: " << ctx->m_handlers
-              << ", max stack: " << ctx->m_maxstack
-              << ", max locals: " << ctx->m_maxlocal );
-    vf_free_graph( ctx );
+    VF_TRACE("method", VF_REPORT_CTX(ctx) << "method statistics: "
+             << " rets: " << ctx->m_retnum
+             << ", length: " << ctx->m_len
+             << ", handlers: " << ctx->m_handlers
+             << ", max stack: " << ctx->m_maxstack
+             << ", max locals: " << ctx->m_maxlocal);
+    vf_free_graph(ctx);
     return result;
 }                               // vf_verify_method_bytecode
 
@@ -137,39 +136,35 @@
 /** 
  * Creates array of instruction branch offsets.
  */
-static inline void
-vf_create_instr_offset( vf_Instr *instr,        // given instruction
-                        unsigned offcount,      // number of offets
-                        vf_Pool *pool ) // memory pool
-{
-    assert( !instr->m_off );
-    instr->m_off =
-        ( unsigned * )vf_palloc( pool, offcount * sizeof( unsigned ) );
+static inline void vf_create_instr_offset(vf_Instr *instr,      // given instruction
+                                          unsigned offcount,    // number of offets
+                                          vf_Pool *pool)        // memory pool
+{
+    assert(!instr->m_off);
+    instr->m_off = (unsigned *) vf_palloc(pool, offcount * sizeof(unsigned));
     instr->m_offcount = offcount;
 }                               // vf_create_instruction_offset
 
 /**
  * Sets instruction branch offset.
  */
-static inline void
-vf_set_instr_offset( vf_InstrHandle instr,      // given instruction
-                     unsigned offnum,   // offset index in array
-                     unsigned value )   // offset value
+static inline void vf_set_instr_offset(vf_InstrHandle instr,    // given instruction
+                                       unsigned offnum, // offset index in array
+                                       unsigned value)  // offset value
 {
-    assert( instr->m_off && offnum < instr->m_offcount );
+    assert(instr->m_off && offnum < instr->m_offcount);
     instr->m_off[offnum] = value;
 }                               // vf_set_instruction_offset
 
 /**
  * Function creates a single branch.
  */
-static inline void
-vf_set_single_branch_offset( vf_Instr *instr,   // given instruction 
-                             unsigned value,    // offset value
-                             vf_Pool *pool )    // memory pool
+static inline void vf_set_single_branch_offset(vf_Instr *instr, // given instruction 
+                                               unsigned value,  // offset value
+                                               vf_Pool *pool)   // memory pool
 {
-    vf_create_instr_offset( instr, 1, pool );
-    vf_set_instr_offset( instr, 0, value );
+    vf_create_instr_offset(instr, 1, pool);
+    vf_set_instr_offset(instr, 0, value);
 }                               // vf_set_single_instruction_offset
 
 /************************************************************
@@ -179,23 +174,21 @@
 /**
  * Sets stack modifier attribute for given code instruction.
  */
-static inline void
-vf_set_stack_modifier( vf_Instr *instr, // code instruction
-                       int modify )     // stack modifier value
+static inline void vf_set_stack_modifier(vf_Instr *instr,       // code instruction
+                                         int modify)    // stack modifier value
 {
     // set stack modifier for instruction
-    instr->m_stack = ( short )modify;
+    instr->m_stack = (short) modify;
 }                               // vf_set_stack_modifier
 
 /**
  * Sets minimal stack attribute for given code instruction.
  */
-static inline void
-vf_set_min_stack( vf_Instr *instr,      // code instruction
-                  unsigned min_stack )  // minimal stack value
+static inline void vf_set_min_stack(vf_Instr *instr,    // code instruction
+                                    unsigned min_stack) // minimal stack value
 {
     // set minimal stack for instruction
-    instr->m_minstack = ( unsigned short )min_stack;
+    instr->m_minstack = (unsigned short) min_stack;
 }                               // vf_set_min_stack
 
 /**
@@ -206,9 +199,9 @@
  * Sets basic block attribute for instruction.
  */
 static inline void
-vf_set_basic_block_flag( unsigned short pc, vf_ContextHandle ctx )
+vf_set_basic_block_flag(unsigned short pc, vf_ContextHandle ctx)
 {
-    assert( pc < ctx->m_len + GOTO_W_LEN );
+    assert(pc < ctx->m_len + GOTO_W_LEN);
     // set begin of basic block for instruction
     ctx->m_bc[pc].m_is_bb_start = true;
 }                               // vf_set_basic_block_flag
@@ -217,9 +210,8 @@
 /**
  * Sets flags for the instruction.
  */
-static inline void
-vf_set_instr_type( vf_Instr *instr,     // instruction
-                   vf_InstrType type )  // given flags
+static inline void vf_set_instr_type(vf_Instr *instr,   // instruction
+                                     vf_InstrType type) // given flags
 {
     // set flag for instruction
     instr->m_type = type;
@@ -228,56 +220,53 @@
 /**
  * Checks local number.
  */
-static inline vf_Result
-vf_check_local_var_number( unsigned local,      // local number
-                           vf_Context *ctx )    // verification context
+static inline vf_Result vf_check_local_var_number(unsigned local,       // local number
+                                                  vf_Context *ctx)      // verification context
 {
     // check local variable number
-    if( local >= ctx->m_maxlocal ) {
-        VF_REPORT( ctx, "Incorrect usage of local variable" );
-        return VER_ErrorLocals;
+    if (local >= ctx->m_maxlocal) {
+        VF_REPORT(ctx, "Incorrect usage of local variable");
+        return VF_ErrorLocals;
     }
-    return VER_OK;
+    return VF_OK;
 }                               // vf_check_local_var_number
 
 /**
  * Checks branch offset.
  */
-static inline vf_Result
-vf_check_branch_offset( int offset,     // given instruction offset
-                        vf_Context *ctx )       // verification context
-{
-    if( offset < 0 || ( unsigned )offset >= ctx->m_len ) {
-        VF_REPORT( ctx, "Instruction branch offset is out of range" );
-        return VER_ErrorBranch;
+static inline vf_Result vf_check_branch_offset(int offset,      // given instruction offset
+                                               vf_Context *ctx) // verification context
+{
+    if (offset < 0 || (unsigned) offset >= ctx->m_len) {
+        VF_REPORT(ctx, "Instruction branch offset is out of range");
+        return VF_ErrorBranch;
     }
     ctx->m_bc[offset].m_is_bb_start = true;
-    return VER_OK;
+    return VF_OK;
 }                               // vf_check_branch_offset
 
 /**
  * Function parses local variable number from instruction bytecode.
  */
-static inline unsigned short
-vf_get_local_var_number( vf_InstrHandle instr,  // code instruction
-                         unsigned char *bytecode,       // method bytecode
-                         unsigned *index_p,     // index in bytecode array
-                         bool wide_flag )       // if this is a wide instruction
+static inline unsigned short vf_get_local_var_number(vf_InstrHandle instr,      // code instruction
+                                                     unsigned char *bytecode,   // method bytecode
+                                                     unsigned *index_p, // index in bytecode array
+                                                     bool wide_flag)    // if this is a wide instruction
 {
     unsigned short local;
 
-    if( ( wide_flag ) ) {
+    if ((wide_flag)) {
         // get number of local variable
         local =
-            ( unsigned short )( ( bytecode[( *index_p )] << 8 ) |
-                                ( bytecode[( *index_p ) + 1] ) );
+            (unsigned short) ((bytecode[(*index_p)] << 8) |
+                              (bytecode[(*index_p) + 1]));
         // skip parameter (u2)
-        ( *index_p ) += 2;
+        (*index_p) += 2;
     } else {
         // get number of local variable
-        local = ( unsigned short )bytecode[( *index_p )];
+        local = (unsigned short) bytecode[(*index_p)];
         // skip parameter (u1)
-        ( *index_p )++;
+        (*index_p)++;
     }
     return local;
 }                               // vf_get_local_var_number
@@ -286,38 +275,33 @@
  * Receives half word (2 bytes) instruction branch offset
  * value from bytecode array.
  */
-static inline int
-vf_get_hword_offset( unsigned code_pc,  // instruction offset in bytecode array
-                     unsigned char *bytecode,   // bytecode array
-                     unsigned *index_p )        // offset index in bytecode array
+static inline int vf_get_hword_offset(unsigned code_pc, // instruction offset in bytecode array
+                                      unsigned char *bytecode,  // bytecode array
+                                      unsigned *index_p)        // offset index in bytecode array
 {
     // get first branch offset
-    int offset = ( int )code_pc
-        +
-        ( short )( ( bytecode[( *index_p )] << 8 ) |
-                   ( bytecode[( *index_p ) + 1] ) );
+    int offset = (int) code_pc
+        + (short) ((bytecode[(*index_p)] << 8) | (bytecode[(*index_p) + 1]));
     // skip parameter (s2)
-    ( *index_p ) += 2;
+    (*index_p) += 2;
     return offset;
 }                               // vf_get_hword_offset
 
 /**
  * Receives word (4 bytes) instruction branch offset value from bytecode array.
  */
-static inline int
-vf_get_word_offset( unsigned code_pc,   // instruction offset in bytecode array
-                    unsigned char *bytecode,    // bytecode array
-                    unsigned *index_p ) // offset index in bytecode array
+static inline int vf_get_word_offset(unsigned code_pc,  // instruction offset in bytecode array
+                                     unsigned char *bytecode,   // bytecode array
+                                     unsigned *index_p) // offset index in bytecode array
 {
     // get switch branch offset
-    int offset = ( int )code_pc
+    int offset = (int) code_pc
         +
-        ( int )( ( bytecode[( *index_p )] << 24 ) |
-                 ( bytecode[( *index_p ) + 1] << 16 )
-                 | ( bytecode[( *index_p ) + 2] << 8 ) |
-                 ( bytecode[( *index_p ) + 3] ) );
+        (int) ((bytecode[(*index_p)] << 24) | (bytecode[(*index_p) + 1] << 16)
+               | (bytecode[(*index_p) + 2] << 8) |
+               (bytecode[(*index_p) + 3]));
     // skip parameter (s4) 
-    ( *index_p ) += 4;
+    (*index_p) += 4;
     return offset;
 }                               // vf_get_word_offset
 
@@ -325,17 +309,16 @@
  * Receives half word (2 bytes) branch offset from bytecode array,
  * sets into instruction and returns it.
  */
-static inline int
-vf_get_single_hword_branch_offset( vf_Instr *instr,     // instruction
-                                   unsigned code_pc,    // offset in bytecode array
-                                   unsigned char *bytecode,     // bytecode array
-                                   unsigned *index_p,   // offset index in bytecode array
-                                   vf_Pool *pool )      // memory pool
+static inline int vf_get_single_hword_branch_offset(vf_Instr *instr,    // instruction
+                                                    unsigned code_pc,   // offset in bytecode array
+                                                    unsigned char *bytecode,    // bytecode array
+                                                    unsigned *index_p,  // offset index in bytecode array
+                                                    vf_Pool *pool)      // memory pool
 {
     // get first branch offset
-    int offset = vf_get_hword_offset( code_pc, bytecode, index_p );
+    int offset = vf_get_hword_offset(code_pc, bytecode, index_p);
     // create and set edge branch for instruction
-    vf_set_single_branch_offset( instr, offset, pool );
+    vf_set_single_branch_offset(instr, offset, pool);
     return offset;
 }                               // vf_get_single_hword_branch_offset
 
@@ -343,17 +326,16 @@
  * Receives word (4 bytes) branch offset from bytecode array,
  * sets into instruction and returns it.
  */
-static inline int
-vf_get_single_word_branch_offset( vf_Instr *instr,      // instruction
-                                  unsigned code_pc,     // offset in bytecode array
-                                  unsigned char *bytecode,      // bytecode array
-                                  unsigned *index_p,    // offset index in bytecode array
-                                  vf_Pool *pool )       // memory pool
+static inline int vf_get_single_word_branch_offset(vf_Instr *instr,     // instruction
+                                                   unsigned code_pc,    // offset in bytecode array
+                                                   unsigned char *bytecode,     // bytecode array
+                                                   unsigned *index_p,   // offset index in bytecode array
+                                                   vf_Pool *pool)       // memory pool
 {
     // get first branch offset
-    int offset = vf_get_word_offset( code_pc, bytecode, index_p );
+    int offset = vf_get_word_offset(code_pc, bytecode, index_p);
     // create and set edge branch for instruction
-    vf_set_single_branch_offset( instr, offset, pool );
+    vf_set_single_branch_offset(instr, offset, pool);
     return offset;
 }                               // vf_get_single_word_branch_offset
 
@@ -362,21 +344,20 @@
  * sets received offset and next instruction offset into instruction.
  * Function returns received offset.
  */
-static inline int
-vf_get_double_hword_branch_offset( vf_Instr *instr,     // instruction
-                                   unsigned code_pc,    // instruction offset in bytcode array
-                                   unsigned char *bytecode,     // bytecode array
-                                   unsigned *index_p,   // offset index in bytecode array
-                                   vf_Pool *pool )      // memory pool
+static inline int vf_get_double_hword_branch_offset(vf_Instr *instr,    // instruction
+                                                    unsigned code_pc,   // instruction offset in bytcode array
+                                                    unsigned char *bytecode,    // bytecode array
+                                                    unsigned *index_p,  // offset index in bytecode array
+                                                    vf_Pool *pool)      // memory pool
 {
     // get first branch offset
-    int offset = vf_get_hword_offset( code_pc, bytecode, index_p );
+    int offset = vf_get_hword_offset(code_pc, bytecode, index_p);
     // create and set edge branches for instruction
-    vf_create_instr_offset( instr, 2, pool );
+    vf_create_instr_offset(instr, 2, pool);
     // set first edge branch for instruction
-    vf_set_instr_offset( instr, 0, offset );
+    vf_set_instr_offset(instr, 0, offset);
     // set second edge branch for instruction
-    vf_set_instr_offset( instr, 1, ( *index_p ) );
+    vf_set_instr_offset(instr, 1, (*index_p));
     return offset;
 }                               // vf_get_double_hword_branch_offset
 
@@ -385,21 +366,20 @@
  * sets received offset and next instruction offset into instruction.
  * Function returns received offset.
  */
-static inline int
-vf_get_double_word_branch_offset( vf_Instr *instr,      // instruction
-                                  unsigned code_pc,     // instruction offset in bytcode array
-                                  unsigned char *bytecode,      // bytecode array
-                                  unsigned *index_p,    // offset index in bytecode array
-                                  vf_Pool *pool )       // memory pool
+static inline int vf_get_double_word_branch_offset(vf_Instr *instr,     // instruction
+                                                   unsigned code_pc,    // instruction offset in bytcode array
+                                                   unsigned char *bytecode,     // bytecode array
+                                                   unsigned *index_p,   // offset index in bytecode array
+                                                   vf_Pool *pool)       // memory pool
 {
     // get first branch offset
-    int offset = vf_get_word_offset( code_pc, bytecode, index_p );
+    int offset = vf_get_word_offset(code_pc, bytecode, index_p);
     // create and set edge branches for instruction
-    vf_create_instr_offset( instr, 2, pool );
+    vf_create_instr_offset(instr, 2, pool);
     // set first edge branch for instruction
-    vf_set_instr_offset( instr, 0, offset );
+    vf_set_instr_offset(instr, 0, offset);
     // set second edge branch for instruction
-    vf_set_instr_offset( instr, 1, ( *index_p ) );
+    vf_set_instr_offset(instr, 1, (*index_p));
     return offset;
 }                               // vf_get_double_word_branch_offset
 
@@ -408,17 +388,16 @@
  * sets received offset into instruction.
  * Function returns received branch.
  */
-static inline int
-vf_get_tableswitch_alternative( vf_InstrHandle instr,   // instruction
-                                unsigned code_pc,       // offset in bytcode array
-                                unsigned alternative,   // number of tableswitch branch
-                                unsigned char *bytecode,        // bytecode array
-                                unsigned *index_p )     // offset index in bytecode array
+static inline int vf_get_tableswitch_alternative(vf_InstrHandle instr,  // instruction
+                                                 unsigned code_pc,      // offset in bytcode array
+                                                 unsigned alternative,  // number of tableswitch branch
+                                                 unsigned char *bytecode,       // bytecode array
+                                                 unsigned *index_p)     // offset index in bytecode array
 {
     // get first branch offset
-    int offset = vf_get_word_offset( code_pc, bytecode, index_p );
+    int offset = vf_get_word_offset(code_pc, bytecode, index_p);
     // set first edge branch for instruction
-    vf_set_instr_offset( instr, alternative, offset );
+    vf_set_instr_offset(instr, alternative, offset);
     return offset;
 }                               // vf_get_tableswitch_alternative
 
@@ -427,34 +406,32 @@
  * sets them into instruction.
  * Function returns number of alternatives.
  */
-static inline int
-vf_set_tableswitch_offsets( vf_Instr *instr,    // instruction
-                            unsigned code_pc,   // instruction offset in bytecode array
-                            unsigned *index_p,  // offset index in bytecode array
-                            unsigned char *bytecode,    // bytecode array
-                            vf_Pool *pool )     // memory pool
+static inline int vf_set_tableswitch_offsets(vf_Instr *instr,   // instruction
+                                             unsigned code_pc,  // instruction offset in bytecode array
+                                             unsigned *index_p, // offset index in bytecode array
+                                             unsigned char *bytecode,   // bytecode array
+                                             vf_Pool *pool)     // memory pool
 {
     // skip padding
-    unsigned default_off = ( ( *index_p ) + 0x3 ) & ( ~0x3U );
+    unsigned default_off = ((*index_p) + 0x3) & (~0x3U);
     unsigned index = default_off;
     // skip default offset
     index += 4;
     // get low and high tableswitch values
-    int low = vf_get_word_offset( code_pc, bytecode, &index );
-    int high = vf_get_word_offset( code_pc, bytecode, &index );
+    int low = vf_get_word_offset(code_pc, bytecode, &index);
+    int high = vf_get_word_offset(code_pc, bytecode, &index);
     int number = high - low + 2;
     // create tableswitch branches
-    vf_create_instr_offset( instr, number, pool );
+    vf_create_instr_offset(instr, number, pool);
     // set default offset
-    vf_get_tableswitch_alternative( instr, code_pc, 0, bytecode,
-                                    &default_off );
+    vf_get_tableswitch_alternative(instr, code_pc, 0, bytecode, &default_off);
     // set another instruction offsets
-    for( int count = 1; count < number; count++ ) {
-        vf_get_tableswitch_alternative( instr, code_pc, count, bytecode,
-                                        &index );
+    for (int count = 1; count < number; count++) {
+        vf_get_tableswitch_alternative(instr, code_pc, count, bytecode,
+                                       &index);
     }
     // set index next instruction
-    ( *index_p ) = index;
+    (*index_p) = index;
     return number;
 }                               // vf_set_tableswitch_offsets
 
@@ -463,46 +440,44 @@
  * sets them into instruction.
  * Function returns number of alternatives.
  */
-static inline vf_Result
-vf_set_lookupswitch_offsets( vf_Instr *instr,   // instruction
-                             unsigned code_pc,  // instruction offset in bytecode
-                             unsigned *index_p, // offset index in bytecode array
-                             unsigned char *bytecode,   // array of bytecode
-                             unsigned *branch_p,        // number of alternatives
-                             vf_Context *ctx )  // verification context
+static inline vf_Result vf_set_lookupswitch_offsets(vf_Instr *instr,    // instruction
+                                                    unsigned code_pc,   // instruction offset in bytecode
+                                                    unsigned *index_p,  // offset index in bytecode array
+                                                    unsigned char *bytecode,    // array of bytecode
+                                                    unsigned *branch_p, // number of alternatives
+                                                    vf_Context *ctx)    // verification context
 {
     // skip padding
-    unsigned default_off = ( ( *index_p ) + 0x3 ) & ( ~0x3U );
+    unsigned default_off = ((*index_p) + 0x3) & (~0x3U);
     unsigned index = default_off;
     // skip default offset
     index += 4;
     // get alternative number of lookupswitch (add default alternative)
-    int number = vf_get_word_offset( 0, bytecode, &index ) + 1;
+    int number = vf_get_word_offset(0, bytecode, &index) + 1;
     *branch_p = number;
     // create and tableswitch branches
-    vf_create_instr_offset( instr, number, ctx->m_pool );
+    vf_create_instr_offset(instr, number, ctx->m_pool);
     // set default offset
-    vf_get_tableswitch_alternative( instr, code_pc, 0, bytecode,
-                                    &default_off );
+    vf_get_tableswitch_alternative(instr, code_pc, 0, bytecode, &default_off);
     // set another instruction offsets
     int old_key = INT_MIN;
-    for( int count = 1; count < number; count++ ) {
+    for (int count = 1; count < number; count++) {
         // get and check branch key value
-        int key = vf_get_word_offset( 0, bytecode, &index );
-        if( old_key < key ) {
+        int key = vf_get_word_offset(0, bytecode, &index);
+        if (old_key < key) {
             old_key = key;
-        } else if( key != INT_MIN ) {
-            VF_REPORT( ctx,
-                       "Instruction lookupswitch has unsorted key values" );
-            return VER_ErrorInstruction;
+        } else if (key != INT_MIN) {
+            VF_REPORT(ctx,
+                      "Instruction lookupswitch has unsorted key values");
+            return VF_ErrorInstruction;
         }
         // get lookupswitch alternative and set offset to instruction
-        vf_get_tableswitch_alternative( instr, code_pc, count, bytecode,
-                                        &index );
+        vf_get_tableswitch_alternative(instr, code_pc, count, bytecode,
+                                       &index);
     }
     // set index next instruction
-    ( *index_p ) = index;
-    return VER_OK;
+    (*index_p) = index;
+    return VF_OK;
 }                               // vf_set_lookupswitch_offsets
 
 /************************************************************
@@ -512,23 +487,21 @@
 /**
  * Sets check type for a given stack map vector entry.
  */
-static inline void
-vf_set_vector_check( vf_MapEntry *vector,       // stack map vector
-                     unsigned num,      // vector entry number
-                     vf_CheckConstraint check ) // constraint check type
+static inline void vf_set_vector_check(vf_MapEntry *vector,     // stack map vector
+                                       unsigned num,    // vector entry number
+                                       vf_CheckConstraint check)        // constraint check type
 {
     // set check for map vector entry
-    assert( check < VF_CHECK_NUM );
+    assert(check < VF_CHECK_NUM);
     vector[num].m_ctype = check;
 }                               // vf_set_vector_check
 
 /**
  * Sets constraint pool index for a given stack map vector entry.
  */
-static inline void
-vf_set_vector_check_index( vf_MapEntry *vector, // stack map vector
-                           unsigned num,        // vector entry number
-                           unsigned short index )       // constraint pool index
+static inline void vf_set_vector_check_index(vf_MapEntry *vector,       // stack map vector
+                                             unsigned num,      // vector entry number
+                                             unsigned short index)      // constraint pool index
 {
     // set index for a map vector entry
     vector[num].m_index = index;
@@ -537,21 +510,19 @@
 /**
  * Sets a given data type to stack map vector entry.
  */
-static inline void
-vf_set_vector_type( vf_MapEntry *vector,        // stack map vector
-                    unsigned num,       // vector entry number
-                    vf_MapType type )   // stack map entry type
+static inline void vf_set_vector_type(vf_MapEntry *vector,      // stack map vector
+                                      unsigned num,     // vector entry number
+                                      vf_MapType type)  // stack map entry type
 {
-    assert( type < SM_NUMBER );
+    assert(type < SM_NUMBER);
     vector[num].m_type = type;
 }                               // vf_set_vector_type
 
 /**
  * Sets null data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_null( vf_MapEntry *vector,    // stack map vector
-                                unsigned num )  // vector entry number
+static inline void vf_set_vector_stack_entry_null(vf_MapEntry *vector,  // stack map vector
+                                                  unsigned num) // vector entry number
 {
     // set stack map vector entry by null
     vector[num].m_type = SM_NULL;
@@ -560,9 +531,8 @@
 /**
  * Sets int data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_int( vf_MapEntry *vector,     // stack map vector
-                               unsigned num )   // vector entry number
+static inline void vf_set_vector_stack_entry_int(vf_MapEntry *vector,   // stack map vector
+                                                 unsigned num)  // vector entry number
 {
     // set stack map vector entry by int
     vector[num].m_type = SM_INT;
@@ -571,9 +541,8 @@
 /**
  * Sets float data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_float( vf_MapEntry *vector,   // stack map vector
-                                 unsigned num ) // vector entry number
+static inline void vf_set_vector_stack_entry_float(vf_MapEntry *vector, // stack map vector
+                                                   unsigned num)        // vector entry number
 {
     // set stack map vector entry by float
     vector[num].m_type = SM_FLOAT;
@@ -582,9 +551,8 @@
 /**
  * Sets long data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_long( vf_MapEntry *vector,    // stack map vector
-                                unsigned num )  // vector entry number
+static inline void vf_set_vector_stack_entry_long(vf_MapEntry *vector,  // stack map vector
+                                                  unsigned num) // vector entry number
 {
     // set stack map vector entry by long
     vector[num].m_type = SM_LONG_HI;
@@ -594,9 +562,8 @@
 /**
  * Sets double data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_double( vf_MapEntry *vector,  // stack map vector
-                                  unsigned num )        // vector entry number
+static inline void vf_set_vector_stack_entry_double(vf_MapEntry *vector,        // stack map vector
+                                                    unsigned num)       // vector entry number
 {
     // set stack map vector entry by double
     vector[num].m_type = SM_DOUBLE_HI;
@@ -606,10 +573,9 @@
 /**
  * Sets return address data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_addr( vf_MapEntry *vector,    // stack map vector
-                                unsigned num,   // vector entry number
-                                unsigned count )        // program count
+static inline void vf_set_vector_stack_entry_addr(vf_MapEntry *vector,  // stack map vector
+                                                  unsigned num, // vector entry number
+                                                  unsigned count)       // program count
 {
     // set stack map vector entry by return address
     vector[num].m_type = SM_RETURN_ADDR;
@@ -619,9 +585,8 @@
 /**
  * Sets single word data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_word( vf_MapEntry *vector,    // stack map vector
-                                unsigned num )  // vector entry number
+static inline void vf_set_vector_stack_entry_word(vf_MapEntry *vector,  // stack map vector
+                                                  unsigned num) // vector entry number
 {
     // set stack map vector entry by word
     vector[num].m_type = SM_WORD;
@@ -630,9 +595,8 @@
 /**
  * Sets double word data type for given stack map vector entry.
  */
-static inline void
-vf_set_vector_stack_entry_word2( vf_MapEntry *vector,   // stack map vector
-                                 unsigned num ) // vector entry number
+static inline void vf_set_vector_stack_entry_word2(vf_MapEntry *vector, // stack map vector
+                                                   unsigned num)        // vector entry number
 {
     // set stack map vector entry by double word
     vector[num].m_type = SM_WORD2_HI;
@@ -642,110 +606,103 @@
 /**
  * Sets int data type for given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_int( vf_MapEntry *vector,       // local variable vector
-                             unsigned num,      // vector entry number
-                             unsigned local )   // number of local variable
+static inline void vf_set_vector_local_var_int(vf_MapEntry *vector,     // local variable vector
+                                               unsigned num,    // vector entry number
+                                               unsigned local)  // number of local variable
 {
     // set local variable vector entry by int
     vector[num].m_type = SM_INT;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
 }                               // vf_set_vector_local_var_int
 
 /**
  * Sets float data type for given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_float( vf_MapEntry *vector,     // local variable vector
-                               unsigned num,    // vector entry number
-                               unsigned local ) // number of local variable
+static inline void vf_set_vector_local_var_float(vf_MapEntry *vector,   // local variable vector
+                                                 unsigned num,  // vector entry number
+                                                 unsigned local)        // number of local variable
 {
     // set local variable vector entry by float
     vector[num].m_type = SM_FLOAT;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
 }                               // vf_set_vector_local_var_float
 
 /**
  * Sets long data type for given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_long( vf_MapEntry *vector,      // local variable vector
-                              unsigned num,     // vector entry number
-                              unsigned local )  // number of local variable
+static inline void vf_set_vector_local_var_long(vf_MapEntry *vector,    // local variable vector
+                                                unsigned num,   // vector entry number
+                                                unsigned local) // number of local variable
 {
     // set local variable vector entry by long
     vector[num].m_type = SM_LONG_HI;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
     vector[num + 1].m_type = SM_LONG_LO;
     vector[num + 1].m_is_local = true;
-    vector[num + 1].m_local = ( unsigned short )( local + 1 );
+    vector[num + 1].m_local = (unsigned short) (local + 1);
 }                               // vf_set_vector_local_var_long
 
 /**
  * Sets double data type for given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_double( vf_MapEntry *vector,    // local variable vector
-                                unsigned num,   // vector entry number
-                                unsigned local )        // number of local variable
+static inline void vf_set_vector_local_var_double(vf_MapEntry *vector,  // local variable vector
+                                                  unsigned num, // vector entry number
+                                                  unsigned local)       // number of local variable
 {
     // set local variable vector entry by double
     vector[num].m_type = SM_DOUBLE_HI;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
     vector[num + 1].m_type = SM_DOUBLE_LO;
     vector[num + 1].m_is_local = true;
-    vector[num + 1].m_local = ( unsigned short )( local + 1 );
+    vector[num + 1].m_local = (unsigned short) (local + 1);
 }                               // vf_set_vector_local_var_double
 
 /**
  * Sets reference data type for given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_ref( vf_MapEntry *vector,       // local variable vector
-                             unsigned num,      // vector entry number
-                             vf_ValidType *type,        // reference type
-                             unsigned local )   // number of local variable
+static inline void vf_set_vector_local_var_ref(vf_MapEntry *vector,     // local variable vector
+                                               unsigned num,    // vector entry number
+                                               vf_ValidType *type,      // reference type
+                                               unsigned local)  // number of local variable
 {
     // set stack map vector entry by reference
     vector[num].m_type = SM_REF;
     vector[num].m_vtype = type;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
 }                               // vf_set_vector_local_var_ref
 
 /**
  * Sets return address data type for given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_addr( vf_MapEntry *vector,      // stack map vector
-                              unsigned num,     // vector entry number
-                              unsigned count,   // program count
-                              unsigned local )  // number of local variable
+static inline void vf_set_vector_local_var_addr(vf_MapEntry *vector,    // stack map vector
+                                                unsigned num,   // vector entry number
+                                                unsigned count, // program count
+                                                unsigned local) // number of local variable
 {
     // set local variable vector entry to return address
     vector[num].m_type = SM_RETURN_ADDR;
     vector[num].m_pc = count;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
 }                               // vf_set_vector_local_var_addr
 
 /**
  * Sets a given data type for a given local variable vector entry.
  */
-static inline void
-vf_set_vector_local_var_type( vf_MapEntry *vector,      // local variable vector
-                              unsigned num,     // vector entry number
-                              vf_MapType type,  // stack map entry type
-                              unsigned local )  // number of local variable
+static inline void vf_set_vector_local_var_type(vf_MapEntry *vector,    // local variable vector
+                                                unsigned num,   // vector entry number
+                                                vf_MapType type,        // stack map entry type
+                                                unsigned local) // number of local variable
 {
     // set stack map vector entry by reference
     vector[num].m_type = type;
     vector[num].m_is_local = true;
-    vector[num].m_local = ( unsigned short )local;
+    vector[num].m_local = (unsigned short) local;
 }                               // vf_set_vector_local_var_type
 
 /************************************************************
@@ -755,175 +712,159 @@
 /**
  * Allocates memory for new code instruction in the IN stack map vector.
  */
-static inline void
-vf_new_in_vector( vf_Instr *instr,      // code instruction
-                  unsigned len, // vector length
-                  vf_Pool *pool )       // memory pool
+static inline void vf_new_in_vector(vf_Instr *instr,    // code instruction
+                                    unsigned len,       // vector length
+                                    vf_Pool *pool)      // memory pool
 {
     // create IN vector
-    instr->m_inlen = ( unsigned short )len;
+    instr->m_inlen = (unsigned short) len;
     instr->m_invector =
-        (vf_MapEntry*)vf_palloc( pool, len * sizeof( vf_MapEntry ) );
+        (vf_MapEntry *) vf_palloc(pool, len * sizeof(vf_MapEntry));
 }                               // vf_new_in_vector
 
 /**
  * Sets check attribute for a code instruction in the IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_check( vf_InstrHandle instr,   // code instruction
-                        unsigned num,   // IN vector entry number
-                        vf_CheckConstraint check )      // constraint check type
+static inline void vf_set_in_vector_check(vf_InstrHandle instr, // code instruction
+                                          unsigned num, // IN vector entry number
+                                          vf_CheckConstraint check)     // constraint check type
 {
-    vf_set_vector_check( instr->m_invector, num, check );
+    vf_set_vector_check(instr->m_invector, num, check);
 }                               // vf_set_in_vector_check
 
 /**
  * Sets constant pool index for a code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_check_index( vf_InstrHandle instr,     // code instruction
-                              unsigned num,     // IN vector entry number
-                              unsigned short index )    // constraint pool index
+static inline void vf_set_in_vector_check_index(vf_InstrHandle instr,   // code instruction
+                                                unsigned num,   // IN vector entry number
+                                                unsigned short index)   // constraint pool index
 {
-    vf_set_vector_check_index( instr->m_invector, num, index );
+    vf_set_vector_check_index(instr->m_invector, num, index);
 }                               // vf_set_in_vector_check_index
 
 /**
  * Sets a given data type to stack map vector entry.
  */
-static inline void
-vf_set_in_vector_type( vf_InstrHandle instr,    // code instruction
-                       unsigned num,    // vector entry number
-                       vf_MapType type )        // stack map entry type
+static inline void vf_set_in_vector_type(vf_InstrHandle instr,  // code instruction
+                                         unsigned num,  // vector entry number
+                                         vf_MapType type)       // stack map entry type
 {
-    vf_set_vector_type( instr->m_invector, num, type );
+    vf_set_vector_type(instr->m_invector, num, type);
 }                               // vf_set_in_vector_type
 
 /**
  * Sets int data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_int( vf_InstrHandle instr, // code instruction
-                                  unsigned num )        // IN vector entry number
+static inline void vf_set_in_vector_stack_entry_int(vf_InstrHandle instr,       // code instruction
+                                                    unsigned num)       // IN vector entry number
 {
-    vf_set_vector_stack_entry_int( instr->m_invector, num );
+    vf_set_vector_stack_entry_int(instr->m_invector, num);
 }                               // vf_set_vector_stack_entry_int
 
 /**
  * Sets float data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_float( vf_InstrHandle instr,       // code instruction
-                                    unsigned num )      // IN vector entry number
+static inline void vf_set_in_vector_stack_entry_float(vf_InstrHandle instr,     // code instruction
+                                                      unsigned num)     // IN vector entry number
 {
-    vf_set_vector_stack_entry_float( instr->m_invector, num );
+    vf_set_vector_stack_entry_float(instr->m_invector, num);
 }                               // vf_set_in_vector_stack_entry_float
 
 /**
  * Sets long data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_long( vf_InstrHandle instr,        // code instruction
-                                   unsigned num )       // IN vector entry number
+static inline void vf_set_in_vector_stack_entry_long(vf_InstrHandle instr,      // code instruction
+                                                     unsigned num)      // IN vector entry number
 {
-    vf_set_vector_stack_entry_long( instr->m_invector, num );
+    vf_set_vector_stack_entry_long(instr->m_invector, num);
 }                               // vf_set_in_vector_stack_entry_long
 
 /**
  * Sets double data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_double( vf_InstrHandle instr,      // code instruction
-                                     unsigned num )     // IN vector entry number
+static inline void vf_set_in_vector_stack_entry_double(vf_InstrHandle instr,    // code instruction
+                                                       unsigned num)    // IN vector entry number
 {
-    vf_set_vector_stack_entry_double( instr->m_invector, num );
+    vf_set_vector_stack_entry_double(instr->m_invector, num);
 }                               // vf_set_in_vector_stack_entry_double
 
 /**
  * Sets reference data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_ref( vf_InstrHandle instr, // code instruction
-                                  unsigned num, // IN vector entry number
-                                  vf_ValidType *type )  // reference type
+static inline void vf_set_in_vector_stack_entry_ref(vf_InstrHandle instr,       // code instruction
+                                                    unsigned num,       // IN vector entry number
+                                                    vf_ValidType *type) // reference type
 {
-    vf_set_vector_stack_entry_ref( instr->m_invector, num, type );
+    vf_set_vector_stack_entry_ref(instr->m_invector, num, type);
 }                               // vf_set_in_vector_stack_entry_ref
 
 /**
  * Sets single word data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_word( vf_InstrHandle instr,        // code instruction
-                                   unsigned num )       // IN vector entry number
+static inline void vf_set_in_vector_stack_entry_word(vf_InstrHandle instr,      // code instruction
+                                                     unsigned num)      // IN vector entry number
 {
-    vf_set_vector_stack_entry_word( instr->m_invector, num );
+    vf_set_vector_stack_entry_word(instr->m_invector, num);
 }                               // vf_set_in_vector_stack_entry_word
 
 /**
  * Sets double word data type for code instruction IN stack map vector entry.
  */
-static inline void
-vf_set_in_vector_stack_entry_word2( vf_InstrHandle instr,       // code instruction
-                                    unsigned num )      // IN vector entry number
+static inline void vf_set_in_vector_stack_entry_word2(vf_InstrHandle instr,     // code instruction
+                                                      unsigned num)     // IN vector entry number
 {
-    vf_set_vector_stack_entry_word2( instr->m_invector, num );
+    vf_set_vector_stack_entry_word2(instr->m_invector, num);
 }                               // vf_set_in_vector_stack_entry_word2
 
 /**
  * Sets int data type for code instruction IN local variable vector entry.
  */
-static inline void
-vf_set_in_vector_local_var_int( vf_InstrHandle instr,   // code instruction
-                                unsigned num,   // IN vector entry number
-                                unsigned local )        // local variable number
+static inline void vf_set_in_vector_local_var_int(vf_InstrHandle instr, // code instruction
+                                                  unsigned num, // IN vector entry number
+                                                  unsigned local)       // local variable number
 {
-    vf_set_vector_local_var_int( instr->m_invector, num, local );
+    vf_set_vector_local_var_int(instr->m_invector, num, local);
 }                               // vf_set_in_vector_local_var_int
 
 /**
  * Sets float data type for code instruction IN local variable vector entry.
  */
-static inline void
-vf_set_in_vector_local_var_float( vf_InstrHandle instr, // code instruction
-                                  unsigned num, // IN vector entry number
-                                  unsigned local )      // local variable number
+static inline void vf_set_in_vector_local_var_float(vf_InstrHandle instr,       // code instruction
+                                                    unsigned num,       // IN vector entry number
+                                                    unsigned local)     // local variable number
 {
-    vf_set_vector_local_var_float( instr->m_invector, num, local );
+    vf_set_vector_local_var_float(instr->m_invector, num, local);
 }                               // vf_set_in_vector_local_var_float 
 
 /**
  * Sets long data type for code instruction IN local variable vector entry.
  */
-static inline void
-vf_set_in_vector_local_var_long( vf_InstrHandle instr,  // code instruction
-                                 unsigned num,  // IN vector entry number
-                                 unsigned local )       // local variable number
+static inline void vf_set_in_vector_local_var_long(vf_InstrHandle instr,        // code instruction
+                                                   unsigned num,        // IN vector entry number
+                                                   unsigned local)      // local variable number
 {
-    vf_set_vector_local_var_long( instr->m_invector, num, local );
+    vf_set_vector_local_var_long(instr->m_invector, num, local);
 }                               // vf_set_in_vector_local_var_long 
 
 /**
  * Sets double data type for code instruction IN local variable vector entry.
  */
-static inline void
-vf_set_in_vector_local_var_double( vf_InstrHandle instr,        // code instruction
-                                   unsigned num,        // IN vector entry number
-                                   unsigned local )     // local variable number
+static inline void vf_set_in_vector_local_var_double(vf_InstrHandle instr,      // code instruction
+                                                     unsigned num,      // IN vector entry number
+                                                     unsigned local)    // local variable number
 {
-    vf_set_vector_local_var_double( instr->m_invector, num, local );
+    vf_set_vector_local_var_double(instr->m_invector, num, local);
 }                               // vf_set_in_vector_local_var_double 
 
 /**
  * Sets reference data type for code instruction IN local variable vector entry.
  */
-static inline void
-vf_set_in_vector_local_var_ref( vf_InstrHandle instr,   // code instruction
-                                unsigned num,   // IN vector entry number
-                                vf_ValidType *type,     // reference type
-                                unsigned local )        // local variable number
+static inline void vf_set_in_vector_local_var_ref(vf_InstrHandle instr, // code instruction
+                                                  unsigned num, // IN vector entry number
+                                                  vf_ValidType *type,   // reference type
+                                                  unsigned local)       // local variable number
 {
-    vf_set_vector_local_var_ref( instr->m_invector, num, type, local );
+    vf_set_vector_local_var_ref(instr->m_invector, num, type, local);
 }                               // vf_set_in_vector_local_var_ref 
 
 /************************************************************
@@ -933,35 +874,32 @@
 /**
  * Function allocates memory for new code instruction OUT stack map vector.
  */
-static inline void
-vf_new_out_vector( vf_Instr *instr,     // code instruction
-                   unsigned len,        // vector length
-                   vf_Pool *pool )      // memory pool
+static inline void vf_new_out_vector(vf_Instr *instr,   // code instruction
+                                     unsigned len,      // vector length
+                                     vf_Pool *pool)     // memory pool
 {
     // create stack map OUT vector
-    instr->m_outlen = ( unsigned short )len;
+    instr->m_outlen = (unsigned short) len;
     instr->m_outvector =
-        (vf_MapEntry*)vf_palloc( pool, len * sizeof( vf_MapEntry ) );
+        (vf_MapEntry *) vf_palloc(pool, len * sizeof(vf_MapEntry));
 }                               // vf_new_out_vector
 
 /**
  * Sets a given data type to stack map OUT vector entry.
  */
-static inline void
-vf_set_out_vector_type( vf_InstrHandle instr,   // code instruction
-                        unsigned num,   // vector entry number
-                        vf_MapType type )       // stack map entry type
+static inline void vf_set_out_vector_type(vf_InstrHandle instr, // code instruction
+                                          unsigned num, // vector entry number
+                                          vf_MapType type)      // stack map entry type
 {
-    vf_set_vector_type( instr->m_outvector, num, type );
+    vf_set_vector_type(instr->m_outvector, num, type);
 }                               // vf_set_out_vector_type
 
 /**
  * Sets a given program counter to stack map OUT vector entry.
  */
-static inline void
-vf_set_out_vector_opcode_new( vf_InstrHandle instr,     // code instruction
-                              unsigned num,     // vector entry number
-                              unsigned opcode_new )     // new opcode
+static inline void vf_set_out_vector_opcode_new(vf_InstrHandle instr,   // code instruction
+                                                unsigned num,   // vector entry number
+                                                unsigned opcode_new)    // new opcode
 {
     instr->m_outvector[num].m_new = opcode_new;
 }                               // vf_set_out_vector_opcode_new
@@ -969,108 +907,98 @@
 /**
  * Sets int data type for code instruction OUT stack map vector entry.
  */
-static inline void
-vf_set_out_vector_stack_entry_int( vf_InstrHandle instr,        // code instruction
-                                   unsigned num )       // OUT vector entry number
+static inline void vf_set_out_vector_stack_entry_int(vf_InstrHandle instr,      // code instruction
+                                                     unsigned num)      // OUT vector entry number
 {
-    vf_set_vector_stack_entry_int( instr->m_outvector, num );
+    vf_set_vector_stack_entry_int(instr->m_outvector, num);
 }                               // vf_set_vector_stack_entry_int
 
 /**
  * Sets float data type for code instruction OUT stack map vector entry.
  */
-static inline void
-vf_set_out_vector_stack_entry_float( vf_InstrHandle instr,      // code instruction
-                                     unsigned num )     // OUT vector entry number
+static inline void vf_set_out_vector_stack_entry_float(vf_InstrHandle instr,    // code instruction
+                                                       unsigned num)    // OUT vector entry number
 {
-    vf_set_vector_stack_entry_float( instr->m_outvector, num );
+    vf_set_vector_stack_entry_float(instr->m_outvector, num);
 }                               // vf_set_out_vector_stack_entry_float
 
 /**
  * Sets long data type for code instruction OUT stack map vector entry.
  */
-static inline void
-vf_set_out_vector_stack_entry_long( vf_InstrHandle instr,       // code instruction
-                                    unsigned num )      // OUT vector entry number
+static inline void vf_set_out_vector_stack_entry_long(vf_InstrHandle instr,     // code instruction
+                                                      unsigned num)     // OUT vector entry number
 {
-    vf_set_vector_stack_entry_long( instr->m_outvector, num );
+    vf_set_vector_stack_entry_long(instr->m_outvector, num);
 }                               // vf_set_out_vector_stack_entry_long
 
 /**
  * Sets double data type for code instruction OUT stack map vector entry.
  */
-static inline void
-vf_set_out_vector_stack_entry_double( vf_InstrHandle instr,     // code instruction
-                                      unsigned num )    // OUT vector entry number
+static inline void vf_set_out_vector_stack_entry_double(vf_InstrHandle instr,   // code instruction
+                                                        unsigned num)   // OUT vector entry number
 {
-    vf_set_vector_stack_entry_double( instr->m_outvector, num );
+    vf_set_vector_stack_entry_double(instr->m_outvector, num);
 }                               // vf_set_out_vector_stack_entry_double
 
 /**
  * Sets reference data type for code instruction OUT stack map vector entry.
  */
-static inline void
-vf_set_out_vector_stack_entry_ref( vf_InstrHandle instr,        // code instruction
-                                   unsigned num,        // OUT vector entry number
-                                   vf_ValidType *type ) // reference type
+static inline void vf_set_out_vector_stack_entry_ref(vf_InstrHandle instr,      // code instruction
+                                                     unsigned num,      // OUT vector entry number
+                                                     vf_ValidType *type)        // reference type
 {
-    vf_set_vector_stack_entry_ref( instr->m_outvector, num, type );
+    vf_set_vector_stack_entry_ref(instr->m_outvector, num, type);
 }                               // vf_set_out_vector_stack_entry_ref
 
 /**
  * Sets int data type for code instruction OUT local variable vector entry.
  */
-static inline void
-vf_set_out_vector_local_var_int( vf_InstrHandle instr,  // code instruction
-                                 unsigned num,  // OUT vector entry number
-                                 unsigned local )       // local variable number
+static inline void vf_set_out_vector_local_var_int(vf_InstrHandle instr,        // code instruction
+                                                   unsigned num,        // OUT vector entry number
+                                                   unsigned local)      // local variable number
 {
-    vf_set_vector_local_var_int( instr->m_outvector, num, local );
+    vf_set_vector_local_var_int(instr->m_outvector, num, local);
 }                               // vf_set_out_vector_local_var_int
 
 /**
  * Sets float data type for code instruction OUT local variable vector entry.
  */
-static inline void
-vf_set_out_vector_local_var_float( vf_InstrHandle instr,        // code instruction
-                                   unsigned num,        // OUT vector entry number
-                                   unsigned local )     // local variable number
+static inline void vf_set_out_vector_local_var_float(vf_InstrHandle instr,      // code instruction
+                                                     unsigned num,      // OUT vector entry number
+                                                     unsigned local)    // local variable number
 {
-    vf_set_vector_local_var_float( instr->m_outvector, num, local );
+    vf_set_vector_local_var_float(instr->m_outvector, num, local);
 }                               // vf_set_out_vector_local_var_float 
 
 /**
  * Sets long data type for code instruction OUT local variable vector entry.
  */
-static inline void
-vf_set_out_vector_local_var_long( vf_InstrHandle instr, // code instruction
-                                  unsigned num, // OUT vector entry number
-                                  unsigned local )      // local variable number
+static inline void vf_set_out_vector_local_var_long(vf_InstrHandle instr,       // code instruction
+                                                    unsigned num,       // OUT vector entry number
+                                                    unsigned local)     // local variable number
 {
-    vf_set_vector_local_var_long( instr->m_outvector, num, local );
+    vf_set_vector_local_var_long(instr->m_outvector, num, local);
 }                               // vf_set_out_vector_local_var_long 
 
 /**
  * Sets double data type for code instruction OUT local variable vector entry.
  */
-static inline void
-vf_set_out_vector_local_var_double( vf_InstrHandle instr,       // code instruction
-                                    unsigned num,       // OUT vector entry number
-                                    unsigned local )    // local variable number
+static inline void vf_set_out_vector_local_var_double(vf_InstrHandle instr,     // code instruction
+                                                      unsigned num,     // OUT vector entry number
+                                                      unsigned local)   // local variable number
 {
-    vf_set_vector_local_var_double( instr->m_outvector, num, local );
+    vf_set_vector_local_var_double(instr->m_outvector, num, local);
 }                               // vf_set_out_vector_local_var_double 
 
 /**
  * Sets a given data type for code instruction OUT local variable vector entry.
  */
-static inline void
-vf_set_out_vector_local_var_type( vf_InstrHandle instr, // code instruction
-                                  unsigned num, // OUT vector entry number
-                                  vf_MapType type,      // stack map entry
-                                  unsigned local )      // local variable number
+static inline void vf_set_out_vector_local_var_type(vf_InstrHandle instr,       // code instruction
+                                                    unsigned num,       // OUT vector entry number
+                                                    vf_MapType type,    // stack map entry
+                                                    unsigned local)     // local variable number
 {
-    vf_set_vector_local_var_type( instr->m_outvector, num, type, local );
+    vf_set_vector_local_var_type(instr->m_outvector, num, type, local);
 }                               // vf_set_out_vector_local_var_type
 
 /************************************************************
@@ -1079,50 +1007,49 @@
 /**
  * Parses method, class or field descriptions.
  */
-void
-vf_parse_description( const char *descr,        // descriptor of method, class or field
-                      unsigned short *inlen,    // returned number of IN descriptor parameters 
-                      unsigned short *outlen )  // returned number of OUT descriptor
+void vf_parse_description(const char *descr,    // descriptor of method, class or field
+                          unsigned short *inlen,        // returned number of IN descriptor parameters 
+                          unsigned short *outlen)       // returned number of OUT descriptor
                                             // parameters (for method)
 {
     /**
      * Check parameters
      */
-    assert( descr );
-    assert( inlen );
+    assert(descr);
+    assert(inlen);
 
     /**
      * Parse description for defining method stack
      */
     *inlen = 0;
-    if( outlen ) {
+    if (outlen) {
         *outlen = 0;
     }
     bool array = false;
 
     // start parsing input parameters
     unsigned short *count = inlen;
-    for( unsigned short index = 0; descr[index]; index++ ) {
-        switch ( descr[index] ) {
+    for (unsigned short index = 0; descr[index]; index++) {
+        switch (descr[index]) {
         case 'L':
             // skip class name
             do {
                 index++;
 #if _VF_DEBUG
-                if( !descr[index] ) {
+                if (!descr[index]) {
                     VF_DIE
-                        ( "vf_parse_description: incorrect structure of constant pool" );
+                        ("vf_parse_description: incorrect structure of constant pool");
                 }
 #endif // _VF_DEBUG
-            } while( descr[index] != ';' );
+            } while (descr[index] != ';');
         case 'B':
         case 'C':
         case 'F':
         case 'I':
         case 'S':
         case 'Z':
-            if( !array ) {
-                ( *count )++;   // increase stack value
+            if (!array) {
+                (*count)++;     // increase stack value
             } else {
                 array = false;  // reset array structure
             }
@@ -1130,8 +1057,8 @@
             break;
         case 'D':
         case 'J':
-            if( !array ) {
-                ( *count ) += 2;        // increase stack value
+            if (!array) {
+                (*count) += 2;  // increase stack value
             } else {
                 array = false;  // reset array structure
             }
@@ -1142,14 +1069,14 @@
             do {
                 index++;
 #if _VF_DEBUG
-                if( !descr[index] ) {
+                if (!descr[index]) {
                     VF_DIE
-                        ( "vf_parse_description: incorrect structure of constant pool" );
+                        ("vf_parse_description: incorrect structure of constant pool");
                 }
 #endif // _VF_DEBUG
-            } while( descr[index] == '[' );
+            } while (descr[index] == '[');
             index--;
-            ( *count )++;       // increase stack value
+            (*count)++;         // increase stack value
             break;
         case '(':
             // parse arguments
@@ -1161,35 +1088,34 @@
             break;
         default:
             VF_DIE
-                ( "vf_parse_description: incorrect structure of constant pool" );
+                ("vf_parse_description: incorrect structure of constant pool");
             break;
         }
     }
 }                               // vf_parse_description
 
 static inline void
-vf_set_array_ref( const char *type,
-                  unsigned len,
-                  vf_MapEntry *vector, unsigned *index, vf_ContextHandle ctx )
+vf_set_array_ref(const char *type,
+                 unsigned len,
+                 vf_MapEntry *vector, unsigned *index, vf_ContextHandle ctx)
 {
     // set array reference entry
-    vf_ValidType *valid = ctx->m_type->NewType( type, len );
-    vf_set_vector_stack_entry_ref( vector, *index, valid );
-    ( *index )++;
+    vf_ValidType *valid = ctx->m_type->NewType(type, len);
+    vf_set_vector_stack_entry_ref(vector, *index, valid);
+    (*index)++;
 }                               // vf_set_array_ref
 
 /**
  * Function parses descriptor and sets input and output data flow vectors.
  */
-void
-vf_set_description_vector( const char *descr,   // descriptor
-                           unsigned short inlen,        // number of entries for IN vector
-                           unsigned short add,  // additional number of entries
-                           // to IN data flow vector
-                           unsigned short outlen,       // number of entries for OUT vector
-                           vf_MapEntry **invector,      // pointer to IN vector
-                           vf_MapEntry **outvector,     // pointer to OUT vector
-                           vf_ContextHandle ctx )       // verification context
+void vf_set_description_vector(const char *descr,       // descriptor
+                               unsigned short inlen,    // number of entries for IN vector
+                               unsigned short add,      // additional number of entries
+                               // to IN data flow vector
+                               unsigned short outlen,   // number of entries for OUT vector
+                               vf_MapEntry **invector,  // pointer to IN vector
+                               vf_MapEntry **outvector, // pointer to OUT vector
+                               vf_ContextHandle ctx)    // verification context
 {
     const char *type = 0;
     unsigned index, count = 0, vector_index;
@@ -1200,18 +1126,18 @@
     /**
      * Check parameters
      */
-    assert( descr );
+    assert(descr);
 
     /**
      * Create vectors
      */
-    if( inlen + add ) {
-        assert( invector );
-        vf_new_vector( invector, inlen + add, pool );
-    }
-    if( outlen ) {
-        assert( outvector );
-        vf_new_vector( outvector, outlen, pool );
+    if (inlen + add) {
+        assert(invector);
+        vf_new_vector(invector, inlen + add, pool);
+    }
+    if (outlen) {
+        assert(outvector);
+        vf_new_vector(outvector, outlen, pool);
     }
 
     /**
@@ -1219,45 +1145,44 @@
      */
     bool array = false;
     vector_index = add;
-    for( index = 0, vector = invector; descr[index]; index++ ) {
-        switch ( descr[index] ) {
+    for (index = 0, vector = invector; descr[index]; index++) {
+        switch (descr[index]) {
         case 'L':
             // skip method name
-            if( !array ) {
+            if (!array) {
                 count = index;
                 type = &descr[count];
             }
             do {
                 index++;
-            } while( descr[index] != ';' );
-            if( !array ) {
+            } while (descr[index] != ';');
+            if (!array) {
                 // set vector reference entry
-                valid = ctx->m_type->NewType( type, index - count );
-                vf_set_vector_stack_entry_ref( *vector, vector_index, valid );
+                valid = ctx->m_type->NewType(type, index - count);
+                vf_set_vector_stack_entry_ref(*vector, vector_index, valid);
                 vector_index++;
             } else {
-                vf_set_array_ref( type, index - count, *vector, &vector_index,
-                                  ctx );
+                vf_set_array_ref(type, index - count, *vector, &vector_index,
+                                 ctx);
                 // reset array structure
                 array = false;
             }
             break;
         case 'Z':
-            if( !array ) {
+            if (!array) {
                 // set vector int entry
-                vf_set_vector_stack_entry_int( *vector, vector_index );
+                vf_set_vector_stack_entry_int(*vector, vector_index);
                 vector_index++;
             } else {
                 // set integer array type
                 unsigned iter;
                 unsigned len = index - count + 1;
-                char *int_array = (char*)vf_palloc( pool, len );
-                for( iter = 0; iter < len - 1; iter++ ) {
+                char *int_array = (char *) vf_palloc(pool, len);
+                for (iter = 0; iter < len - 1; iter++) {
                     int_array[iter] = '[';
                 }
                 int_array[iter] = 'B';
-                vf_set_array_ref( int_array, len, *vector, &vector_index,
-                                  ctx );
+                vf_set_array_ref(int_array, len, *vector, &vector_index, ctx);
                 // reset array structure
                 array = false;
             }
@@ -1266,49 +1191,49 @@
         case 'B':
         case 'C':
         case 'S':
-            if( !array ) {
+            if (!array) {
                 // set vector int entry
-                vf_set_vector_stack_entry_int( *vector, vector_index );
+                vf_set_vector_stack_entry_int(*vector, vector_index);
                 vector_index++;
             } else {
-                vf_set_array_ref( type, index - count + 1, *vector,
-                                  &vector_index, ctx );
+                vf_set_array_ref(type, index - count + 1, *vector,
+                                 &vector_index, ctx);
                 // reset array structure
                 array = false;
             }
             break;
         case 'F':
-            if( !array ) {
+            if (!array) {
                 // set vector float entry
-                vf_set_vector_stack_entry_float( *vector, vector_index );
+                vf_set_vector_stack_entry_float(*vector, vector_index);
                 vector_index++;
             } else {
-                vf_set_array_ref( type, index - count + 1, *vector,
-                                  &vector_index, ctx );
+                vf_set_array_ref(type, index - count + 1, *vector,
+                                 &vector_index, ctx);
                 // reset array structure
                 array = false;
             }
             break;
         case 'D':
-            if( !array ) {
+            if (!array) {
                 // set vector double entry
-                vf_set_vector_stack_entry_double( *vector, vector_index );
+                vf_set_vector_stack_entry_double(*vector, vector_index);
                 vector_index += 2;
             } else {
-                vf_set_array_ref( type, index - count + 1, *vector,
-                                  &vector_index, ctx );
+                vf_set_array_ref(type, index - count + 1, *vector,
+                                 &vector_index, ctx);
                 // reset array structure
                 array = false;
             }
             break;
         case 'J':
-            if( !array ) {
+            if (!array) {
                 // set vector long entry
-                vf_set_vector_stack_entry_long( *vector, vector_index );
+                vf_set_vector_stack_entry_long(*vector, vector_index);
                 vector_index += 2;
             } else {
-                vf_set_array_ref( type, index - count + 1, *vector,
-                                  &vector_index, ctx );
+                vf_set_array_ref(type, index - count + 1, *vector,
+                                 &vector_index, ctx);
                 // reset array structure
                 array = false;
             }
@@ -1321,7 +1246,7 @@
             // skip array structure
             do {
                 index++;
-            } while( descr[index] == '[' );
+            } while (descr[index] == '[');
             index--;
             break;
         case '(':
@@ -1348,15 +1273,14 @@
 /**
  * Function returns name string from NameAndType constant pool entry.
  */
-static inline const char *
-vf_get_name_from_cp_nameandtype( unsigned short index,  // constant pool entry index
-                                 vf_ContextHandle ctx ) // verification context
+static inline const char *vf_get_name_from_cp_nameandtype(unsigned short index, // constant pool entry index
+                                                          vf_ContextHandle ctx) // verification context
 {
     // get name constant pool index
     unsigned short name_cp_index =
-        class_get_cp_name_index( ctx->m_class, index );
+        class_get_cp_name_index(ctx->m_class, index);
     // get name string from NameAndType constant pool entry
-    const char *name = class_get_cp_utf8_bytes( ctx->m_class, name_cp_index );
+    const char *name = class_get_cp_utf8_bytes(ctx->m_class, name_cp_index);
 
     return name;
 }                               // vf_get_name_from_cp_nameandtype
@@ -1364,16 +1288,14 @@
 /**
  * Function returns descriptor string from NameAndType constant pool entry.
  */
-static inline const char *
-vf_get_decriptor_from_cp_nameandtype( unsigned short index,     // constant pool entry index
-                                      vf_ContextHandle ctx )    // verification context
+static inline const char *vf_get_decriptor_from_cp_nameandtype(unsigned short index,    // constant pool entry index
+                                                               vf_ContextHandle ctx)    // verification context
 {
     // get description constant pool index
     unsigned short descr_cp_index =
-        class_get_cp_descriptor_index( ctx->m_class, index );
+        class_get_cp_descriptor_index(ctx->m_class, index);
     // get descriptor from NameAndType constant pool entry
-    const char *descr =
-        class_get_cp_utf8_bytes( ctx->m_class, descr_cp_index );
+    const char *descr = class_get_cp_utf8_bytes(ctx->m_class, descr_cp_index);
 
     return descr;
 }                               // vf_get_cp_nameandtype
@@ -1381,44 +1303,43 @@
 /**
  * Function returns valid type string by given class name.
  */
-static inline const char *
-vf_get_class_valid_type( const char *class_name,        // class name
-                         size_t name_len,       // class name length
-                         size_t * len,  // length of created string
-                         vf_Pool *pool )        // memory pool
+static inline const char *vf_get_class_valid_type(const char *class_name,       // class name
+                                                  size_t name_len,      // class name length
+                                                  size_t * len, // length of created string
+                                                  vf_Pool *pool)        // memory pool
 {
     char *result;
 
     // create valid type
-    if( class_name[0] == '[' ) {
+    if (class_name[0] == '[') {
         // copy array class name
-        if( class_name[name_len - 1] == ';' ) {
+        if (class_name[name_len - 1] == ';') {
             // object type array
             *len = name_len - 1;
-            result = (char*)class_name;
+            result = (char *) class_name;
         } else {
             // primitive type array
             *len = name_len;
-            result = (char*)class_name;
-            switch ( class_name[name_len - 1] ) {
+            result = (char *) class_name;
+            switch (class_name[name_len - 1]) {
             case 'Z':
                 // set integer array type
-                result = (char*)vf_palloc( pool, ( *len ) + 1 );
-                memcpy( result, class_name, name_len );
+                result = (char *) vf_palloc(pool, (*len) + 1);
+                memcpy(result, class_name, name_len);
                 result[name_len - 1] = 'B';
                 break;
             default:
                 // don't need change type
-                result = (char*)class_name;
+                result = (char *) class_name;
                 break;
             }
         }
     } else {
         // create class signature
         *len = name_len + 1;
-        result = (char*)vf_palloc( pool, ( *len ) + 1 );
+        result = (char *) vf_palloc(pool, (*len) + 1);
         result[0] = 'L';
-        memcpy( &result[1], class_name, name_len );
+        memcpy(&result[1], class_name, name_len);
     }
     return result;
 }                               // vf_get_class_valid_type
@@ -1426,19 +1347,18 @@
 /**
  * Function creates valid type by given class name.
  */
-vf_ValidType *
-vf_create_class_valid_type( const char *class_name,     // class name
-                            vf_ContextHandle ctx )      // verification context
+vf_ValidType *vf_create_class_valid_type(const char *class_name,        // class name
+                                         vf_ContextHandle ctx)  // verification context
 {
     size_t len;
     vf_ValidType *result;
 
     // get class valid type
-    const char *type = vf_get_class_valid_type( class_name,
-                                                strlen( class_name ),
-                                                &len, ctx->m_pool );
+    const char *type = vf_get_class_valid_type(class_name,
+                                               strlen(class_name),
+                                               &len, ctx->m_pool);
     // create valid type
-    result = ctx->m_type->NewType( type, len );
+    result = ctx->m_type->NewType(type, len);
     return result;
 }                               // vf_create_class_valid_type
 
@@ -1447,28 +1367,27 @@
  * Function returns result of check and
  * name string, type descriptor string and class name string (if it's needed).
  */
-static inline void
-vf_check_cp_ref( unsigned short index,  // constant pool entry index
-                 const char **name,     // pointer to name
-                 const char **descr,    // pointer to descriptor
-                 const char **class_name,       // pointer to class name
-                 vf_ContextHandle ctx ) // verification context
+static inline void vf_check_cp_ref(unsigned short index,        // constant pool entry index
+                                   const char **name,   // pointer to name
+                                   const char **descr,  // pointer to descriptor
+                                   const char **class_name,     // pointer to class name
+                                   vf_ContextHandle ctx)        // verification context
 {
-    assert( name );
-    assert( descr );
+    assert(name);
+    assert(descr);
 
     // get class name if it's needed
-    if( class_name ) {
+    if (class_name) {
         unsigned short class_cp_index =
-            class_get_cp_ref_class_index( ctx->m_class, index );
-        *class_name = vf_get_cp_class_name( ctx->m_class, class_cp_index );
+            class_get_cp_ref_class_index(ctx->m_class, index);
+        *class_name = vf_get_cp_class_name(ctx->m_class, class_cp_index);
     }
     // get name and descriptor from NameAndType constant pool entry
     unsigned short name_and_type_cp_index =
-        class_get_cp_ref_name_and_type_index( ctx->m_class, index );
-    *name = vf_get_name_from_cp_nameandtype( name_and_type_cp_index, ctx );
+        class_get_cp_ref_name_and_type_index(ctx->m_class, index);
+    *name = vf_get_name_from_cp_nameandtype(name_and_type_cp_index, ctx);
     *descr =
-        vf_get_decriptor_from_cp_nameandtype( name_and_type_cp_index, ctx );
+        vf_get_decriptor_from_cp_nameandtype(name_and_type_cp_index, ctx);
 }                               // vf_check_cp_ref
 
 /**
@@ -1476,60 +1395,59 @@
  * Sets IN and OUT vectors for constant pool entries.
  * @return result of the check
  */
-static vf_Result
-vf_check_cp_method( unsigned short index,       // constant pool entry index
-                    vf_Parse * cp_parse,        // entry parse result structure
-                    bool is_interface,  // interface flag
-                    bool stack_with_ref,        // stack with this reference flag
-                    vf_Context *ctx )   // verification context
+static vf_Result vf_check_cp_method(unsigned short index,       // constant pool entry index
+                                    vf_Parse * cp_parse,        // entry parse result structure
+                                    bool is_interface,  // interface flag
+                                    bool stack_with_ref,        // stack with this reference flag
+                                    vf_Context *ctx)    // verification context
 {
     // get constant pool length
-    unsigned short len = class_get_cp_size( ctx->m_class );
+    unsigned short len = class_get_cp_size(ctx->m_class);
 
     // check constant pool index
-    CHECK_CONST_POOL_ID( index, len, ctx );
+    CHECK_CONST_POOL_ID(index, len, ctx);
     // check constant pool type
-    if( is_interface ) {
-        CHECK_CONST_POOL_INTERFACE( ctx, index );
+    if (is_interface) {
+        CHECK_CONST_POOL_INTERFACE(ctx, index);
     } else {
-        CHECK_CONST_POOL_METHOD( ctx, index );
+        CHECK_CONST_POOL_METHOD(ctx, index);
     }
 
     // get method description and name
     const char *name = NULL;
     const char *descr = NULL;
     const char *class_name;
-    vf_check_cp_ref( index, &name, &descr,
-                     ( stack_with_ref ? &class_name : NULL ), ctx );
+    vf_check_cp_ref(index, &name, &descr,
+                    (stack_with_ref ? &class_name : NULL), ctx);
     // check result
-    assert( name );
-    assert( descr );
+    assert(name);
+    assert(descr);
 
     // set method name
     cp_parse->method.m_name = name;
 
     // parse method description
-    vf_parse_description( descr, &cp_parse->method.m_inlen,
-                          &cp_parse->method.m_outlen );
+    vf_parse_description(descr, &cp_parse->method.m_inlen,
+                         &cp_parse->method.m_outlen);
     // create instruction vectors
-    if( stack_with_ref ) {
-        vf_set_description_vector( descr, cp_parse->method.m_inlen,
-                                   1 /* ref + vector */ ,
-                                   cp_parse->method.m_outlen,
-                                   &cp_parse->method.m_invector,
-                                   &cp_parse->method.m_outvector, ctx );
+    if (stack_with_ref) {
+        vf_set_description_vector(descr, cp_parse->method.m_inlen,
+                                  1 /* ref + vector */ ,
+                                  cp_parse->method.m_outlen,
+                                  &cp_parse->method.m_invector,
+                                  &cp_parse->method.m_outvector, ctx);
         // set first ref
         cp_parse->method.m_inlen += 1;
-        vf_ValidType *type = vf_create_class_valid_type( class_name, ctx );
-        vf_set_vector_stack_entry_ref( cp_parse->method.m_invector, 0, type );
+        vf_ValidType *type = vf_create_class_valid_type(class_name, ctx);
+        vf_set_vector_stack_entry_ref(cp_parse->method.m_invector, 0, type);
     } else {
-        vf_set_description_vector( descr, cp_parse->method.m_inlen,
-                                   0 /* only vector */ ,
-                                   cp_parse->method.m_outlen,
-                                   &cp_parse->method.m_invector,
-                                   &cp_parse->method.m_outvector, ctx );
+        vf_set_description_vector(descr, cp_parse->method.m_inlen,
+                                  0 /* only vector */ ,
+                                  cp_parse->method.m_outlen,
+                                  &cp_parse->method.m_invector,
+                                  &cp_parse->method.m_outvector, ctx);
     }
-    return VER_OK;
+    return VF_OK;
 }                               // vf_check_cp_method
 
 /**
@@ -1537,44 +1455,43 @@
  * Sets data flow vector for constant pool entry.
  * @return result of the check
  */
-static vf_Result
-vf_check_cp_field( unsigned short index,        // constant pool entry index
-                   vf_Parse * cp_parse, // entry parse result structure
-                   bool stack_with_ref, // stack with this reference flag
-                   vf_Context *ctx )    // verification context
+static vf_Result vf_check_cp_field(unsigned short index,        // constant pool entry index
+                                   vf_Parse * cp_parse, // entry parse result structure
+                                   bool stack_with_ref, // stack with this reference flag
+                                   vf_Context *ctx)     // verification context
 {
     // check constant pool index and type
-    unsigned short len = class_get_cp_size( ctx->m_class );
-    CHECK_CONST_POOL_ID( index, len, ctx );
-    CHECK_CONST_POOL_FIELD( ctx, index );
+    unsigned short len = class_get_cp_size(ctx->m_class);
+    CHECK_CONST_POOL_ID(index, len, ctx);
+    CHECK_CONST_POOL_FIELD(ctx, index);
 
     // get field description and name
     const char *name = NULL;
     const char *descr = NULL;
     const char *class_name;
-    vf_check_cp_ref( index, &name, &descr,
-                     ( stack_with_ref ? &class_name : NULL ), ctx );
+    vf_check_cp_ref(index, &name, &descr,
+                    (stack_with_ref ? &class_name : NULL), ctx);
     // check result
-    assert( name );
-    assert( descr );
+    assert(name);
+    assert(descr);
 
     // parse field description
-    vf_parse_description( descr, &cp_parse->field.f_vlen, NULL );
+    vf_parse_description(descr, &cp_parse->field.f_vlen, NULL);

[... 4846 lines stripped ...]


Mime
View raw message