You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2008/02/05 14:16:09 UTC
[jira] Commented: (HARMONY-5142) [drlvm][verifier] initial
implementation of recompute stackmap
[ https://issues.apache.org/jira/browse/HARMONY-5142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565738#action_12565738 ]
Alexey Varlamov commented on HARMONY-5142:
------------------------------------------
Added a placeholder for building static library for the verifier extensions at r618637:
working_vm\make\vm\verifier-ext.xml
The "verifier-ext" library will be available in HDK bundles under <hdk-root>/lib directory.
> [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
> Attachments: recompute.zip
>
>
> 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 start_pc,
> 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:
> vf_Result
> 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;
> }
> ////// INSTRUMENT CODE HERE
> //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
> free(stackmap);
> }
> return result;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.