X hits on this document

377 views

0 shares

0 downloads

0 comments

31 / 120

15:

invokespecial

#4;

//

java/lang/StringBuilder.init

18:

ldc #5;

//

"Argument["

20:

invokevirtual

#6;

//

java/lang/StringBuilder.append

24:

invokevirtual

#7;

//

java/lang/StringBuilder

27:

ldc #8;

//

"]:"

29:

invokevirtual

#6;

//

java/lang/StringBuilder.append

bytecode creates a new instance of the StringBuilder class and invokes its append method

44:

iinc

1, 1

47:

goto

2

50:

return

for each occurrence of the “+” operator in the original Java source code (there are three).

23:

iload 1

_

A loss of information has indeed occurred, but we'll see that it's still possible to generate

Table 5.3 lists the result of decompiling ListArguments.class using Jad; while the code is

different from the original ListArguments.java program, it is functionally equivalent and

syntactically correct, which is a much better result than that seen earlier with decompiling

32:

aload_0

33:

iload_1

34:

aaload

35:

invokevirtual

#6;

38:

invokevirtual

#9;

41:

invokevirtual

#10

Java source code equivalent to the original in function, but not in syntax.

// java/lang/StringBuilder.append // java/lang/StringBuilder.toString ; // java/io/PrintStream.println

Table 5.2. Java bytecode contained in ListArguments.class.

0:

iconst_0

1:

istore_1

2:

iload_1

3:

aload_0

4:

arraylength

5:

if_icmpge

8:

getstatic

11:

new #3;

14:

dup

50 #2;

// //

java/lang/System.out java/lang/StringBuilder

machine code.

23

Document info
Document views377
Page views378
Page last viewedFri Dec 09 10:25:42 UTC 2016
Pages120
Paragraphs2913
Words25794

Comments