harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5142) [drlvm][verifier] initial implementation of recompute stackmap
Date Sat, 17 Nov 2007 11:28:42 GMT
[drlvm][verifier] initial implementation of recompute stackmap

                 Key: HARMONY-5142
                 URL: https://issues.apache.org/jira/browse/HARMONY-5142
             Project: Harmony
          Issue Type: New Feature
          Components: DRLVM
            Reporter: Mikhail Loenko

Here is an initial implementation of recompute stackmap by Eclipse TPTP request


Currently Requires:

methods necessary to implement in addition to the standard class interface:

//returns index of class entry in the constant pool (extends constant pool if necessary)
uint16 class_get_cp_class_entry(class_handler k_class, const char* name);

//removes exception handler
void method_remove_exc_handler( method_handler method, unsigned short idx );

//modifies existing exception handler info
void method_modify_exc_handler_info( method_handler method, unsigned short idx, unsigned short
                                    unsigned short end_pc, unsigned short handler_pc, unsigned
short handler_cp_index );

class_is_extending_class needs to be adjusted according to HARMONY-5141


Current Usage Example:

instrument_class( class_handler klass, char **error )
    int index;
    vf_Result result = VF_OK;

    // Create contexts
    SharedClasswideData classwide(klass);
    vf_Context_6 context6(classwide);

    // we may both use the same context for all methods in the class or create it each time
for a next method
    for( index = 0; index < class_get_method_number( klass ); index++ ) {
        method_handler method = class_get_method( klass, index );

        //partially verifiy original code (and record trusted pairs)
        result = context6.verify_method(method);

        if (result != VF_OK) {
            //original code was broken
            *error = &(err_message[0]);
            sprintf(*error, "%s/%s%s, reason: %s", class_get_name( klass ), method_get_name(
method ), 
                method_get_descriptor( method ), context6.error_message );
            return result;


        //calculate new stackmap
        uint8 *stackmap;
        result = vf_recompute_stackmaptable(method, &stackmap, error, classwide.class_constraints);

        if (result != VF_OK) {
            // report a problem

        //USE NEW stackmap

        //free it somewhere later

    return result;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message