jasmin

Difference between JVM's LookupSwitch and TableSwitch?

梦想与她 提交于 2019-11-26 23:55:56
I have some difficulty to understand LookUpSwitch and TableSwitch in Java bytecode. If I understand well, both LookUpSwitch and TableSwitch correspond to the switch statement of Java source? Why one JAVA statement generates 2 different bytecodes? Jasmin documentation of each: LookupSwitch tableswitch The difference is that a lookupswitch uses a table with keys and labels , yet a tableswitch uses a table with labels only . When performing a tableswitch , the int value on top of stack is directly used as an index into the table to grab the jump destination and perform the jump immediately. The

Difference between JVM's LookupSwitch and TableSwitch?

假装没事ソ 提交于 2019-11-26 07:18:05
问题 I have some difficulty to understand LookUpSwitch and TableSwitch in Java bytecode. If I understand well, both LookUpSwitch and TableSwitch correspond to the switch statement of Java source? Why one JAVA statement generates 2 different bytecodes? Jasmin documentation of each: LookupSwitch tableswitch 回答1: The difference is that lookupswitch uses a table with keys and labels tableswitch uses a table with labels only . When performing a tableswitch , the int value on top of stack is directly

工具导航Map