Skip to content

Why Code#compare parameter order is reversed after generated dex?  #180

@wuyr

Description

@wuyr

I have the following code:

Local local1 = methodCodeBlock.newLocal(TypeId.INT);
Local parameter = methodCodeBlock.getParameter(0, TypeId.INT);
            
...
     
methodCodeBlock.compare(Comparison.LT, label, local1, parameter);

The expected result should be:

if(local1 >= parameter)
...

But when I invoke the DexMaker#generate, the result I see is:

if(parameter >= local1)
...

Is this a bug? Or am I using it incorrectly? If I use it incorrectly, can someone tell me how to use it correctly? Thank a lot!
Is this project still alive? The last update I saw was last May

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions