notishell / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

DexLib: Add getters for inWords and outWords in CodeItem class #129

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Getter methods for inWords and outWords are missing in the CodeItem class. 

They would be very useful if someone would like to build a new CodeItem 
instance based on existing one (for example for merging two Dex files). 
CodeItem.internCodeItem() take inWords and outWords as arguments, so it's 
necessary to add getters to read existing inWords and outWords fields.

The code would be trivial:

    /**
     * @return the the number of words of incoming arguments to the method that this code is for
     */
    public int getInWords() {
        return inWords;
    }

    /**
     * @return the the number of words of outgoing argument space required by this code for method invocation
     */
    public int getOutWords() {
        return outWords;
    }

Original issue reported on code.google.com by avkuli...@gmail.com on 9 Jul 2012 at 8:40

GoogleCodeExporter commented 9 years ago

Original comment by bgruv@google.com on 9 Jul 2012 at 9:39

GoogleCodeExporter commented 9 years ago
Done.

https://code.google.com/p/smali/source/detail?r=7d37656282f7b1c3d145a0666ad94f4c
d491ff8d

Original comment by jesusfreke@jesusfreke.com on 14 Jul 2012 at 1:32