• No results found

Oversættelse af symbolsk maskinsprog. Sammenkædning og indlæsning af maskinsprog

N/A
N/A
Protected

Academic year: 2021

Share "Oversættelse af symbolsk maskinsprog. Sammenkædning og indlæsning af maskinsprog"

Copied!
60
0
0

Loading.... (view fulltext now)

Full text

(1)

Oversættelse af

symbolsk maskinsprog

Sammenkædning og indlæsning af

maskinsprog

(2)

Niveauer af abstrakte maskiner

Spørgsmål ...

Hvordan bruges asm-niveauet?

metode til programmering

Hvordan stilles asm-niveauet tilrådighed?

oversættelse af symbolsk maskinsprog

til absolut maskinsprog

(3)

Programmering i

symbolsk maskinsprog

Evt. optimeringer foretages

altid

på et korrekt program ...

Tag udgangspunkt i et C program

Oversæt systematisk til symbolsk maskinsprog

Kommenter med C programmet

(4)

.method main //

int main

.args 3 //

( int a, int b )

.define a = 1

.define b = 2

//

{

bipush 88

iload a

iload b

invokevirtual min

ireturn //

return min ( a, b );

//

}

.method min //

int min

.args 3 //

( int a, int b ){

.define a = 1

.define b = 2

.locals 1 //

int r;

.define r = 3

iload a //

if ( a >= b )

iload b

isub

iflt else

iload b //

r = b;

istore r

goto end_if

else: //

else

iload a //

r = a;

istore r

end_if:

iload r //

return r;

ireturn //

}

main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03

00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00

07 15 01 36 03 15 03 ac

constant pool: 2 words

00000000

0000000e

Hvilke opgaver har

assembleren for at

producere absolut

maskinkode?

(5)

Oversættelse af symbolsk maskinsprog

1-1 afbildning mellem maskinordre og symbolsk maskinordre

Oversættelse er vel ligetil?

(6)

.method main //

int main

.args 3 //

( int a, int b )

.define a = 1

.define b = 2

//

{

bipush 88

iload a

iload b

invokevirtual min

ireturn

//

return min ( a, b );

//

}

.method min //

int min

.args 3 //

( int a, int b ){

.define a = 1

.define b = 2

.locals 1 //

int r;

.define r = 3

iload a //

if ( a >= b )

iload b

isub

iflt else

iload b //

r = b;

istore r

goto end_if

else: //

else

iload a //

r = a;

istore r

end_if:

iload r //

return r;

ireturn

//

}

main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6

?? ?? ac 00 03 00 01 15 01 15 02

64 9b ?? ?? 15 02 36 03 a7 ?? ??

15 01 36 03 15 03 ac

constant pool: 2 words

00000000

0000000e

Sekventiel

(7)

Two-pass assembler

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // } main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00 07 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

1. gennemløb

Opbyg symboltabel

Sammenknytning af symbolske navne og værdier ...

2. gennemløb

oversættelse af program ordre for ordre ...

ijvm-asm test.j

test.bc

(8)

Hvad skal asm holde styr på?

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

Adressen på næste ledige

byte

i method area:

Instruction Location Counter

Adressen på næste ledige

word i constant pool:

Constant Location Counter

Værdier knyttet til

symboler, konstanter,

metodenavne, labels:

Symboltabel

main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00 07 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

(9)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 0

CLC: 0

main index: method area: constant pool:

(10)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 0

CLC: 1

main index: 0 method area: constant pool: 00000000

Symbol

værdi

type

(11)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 4

CLC: 1

main index: 0 method area: 00 03 00 00 constant pool: 00000000

Symbol

værdi

type

(12)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 4

CLC: 1

main index: 0 method area: 00 03 00 00 constant pool: 00000000

Symbol

værdi

type

scope

main

0

metode

(13)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 4

CLC: 1

main index: 0 method area: 00 03 00 00 constant pool: 00000000

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

(14)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 6

CLC: 1

main index: 0 method area: 00 03 00 00 10 58 constant pool: 00000000

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

(15)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 8

CLC: 1

main index: 0 method area: 00 03 00 00 10 58 15 01 constant pool: 00000000

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

(16)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 10

CLC: 1

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 constant pool: 00000000

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

(17)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 13

CLC: 1

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? constant pool: 00000000

Forward reference (

min

er ikke i symboltabellen)

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

(18)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 14

CLC: 1

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac constant pool: 00000000

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

(19)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 14

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

(20)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 18

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(21)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 20

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(22)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 22

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(23)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 23

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(24)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 26

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 02 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? constant pool: 00000000 0000000e

Forward reference

(

else

er ikke defineret)

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(25)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 28

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(26)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 30

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(27)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 33

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? constant pool: 00000000 0000000e

Forward reference

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(28)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 33

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(29)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 35

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(30)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 37

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

(31)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 37

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(32)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 39

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 15 03 constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(33)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 40

CLC: 2

main index: 0 method area: 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 15 03 ac constant pool: 00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(34)

1. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // }

ILC: 40

CLC: 2

main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 15 03 ac

constant pool: 2 words

00000000 0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(35)

2. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // } main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 ?? ?? ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

Udfyld “huller” vha.

symboltabel

(36)

2. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // } main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b ?? ?? 15 02 36 03 a7 ?? ?? 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

ILC: 13

CLC: 1

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(37)

2. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // } main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 ?? ?? 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

ILC: 26

CLC: 2

23

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(38)

2. gennemløb

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // } main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00 07 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

ILC: 33

CLC: 2

30

Symbol

værdi

type

scope

main

0

metode

a

1

konstant

main

b

2

konstant

main

min

1

metode

a

1

konstant

min

b

2

konstant

min

r

3

konstant

min

else

33

label

min

end_if

37

label

min

(39)

Two-pass assembler

.method main // int main

.args 3 // ( int a, int b )

.define a = 1 .define b = 2 // { bipush 88 iload a iload b invokevirtual min

ireturn // return min ( a, b );

// }

.method min // int min

.args 3 // ( int a, int b ){

.define a = 1 .define b = 2 .locals 1 // int r; .define r = 3 iload a // if ( a >= b ) iload b isub iflt else iload b // r = b; istore r goto end_if else: // else iload a // r = a; istore r end_if: iload r // return r; ireturn // } main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00 07 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

1. gennemløb

Opbyg symboltabel

Sammenknytning af symbolske navne og værdier ...

2. gennemløb

oversættelse af program ordre for ordre ...

ijvm-asm test.j

test.bc

(40)

main index: 0

method area: 40 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00 07 15 01 36 03 15 03 ac

constant pool: 2 words 00000000

0000000e

Maskinsprog / binært program

Indlæsning af IJVM program

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 01 15 01 15 02 64 9b 00 0a 15 02 36 03 a7 00 07 15 01 36 03 15 03 ac 00 00 00 00 00 00 00 0e

PC = 0

CPP = 10

SP = 16

LV = 12

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ... 64

1.Indlæs binært program i lager (method area

og constant pool) startende fra adresse 0

2.Initialiser kontrolregistre PC, CPP, LV og SP

3.Start afvikling; invokevirtual ''main index''

(41)

IJVM Trace of test.bc

stack = 0, 1, 87, 42, 15

bipush 88 [10 58] stack = 88, 0, 1, 87, 42, 15

iload 1 [15 01] stack = 42, 88, 0, 1, 87, 42, 15

iload 2 [15 02] stack = 87, 42, 88, 0, 1, 87, 42, 15

invokevirtual 1 [b6 00 01] stack = 12, 13, 0, 87, 42, 21, 0, 1

iload 1 [15 01] stack = 42, 12, 13, 0, 87, 42, 21, 0

iload 2 [15 02] stack = 87, 42, 12, 13, 0, 87, 42, 21

isub [64] stack = -45, 12, 13, 0, 87, 42, 21, 0

iflt 10 [9b 00 0a] stack = 12, 13, 0, 87, 42, 21, 0, 1

iload 1 [15 01] stack = 42, 12, 13, 0, 87, 42, 21, 0

istore 3 [36 03] stack = 12, 13, 42, 87, 42, 21, 0, 1

iload 3 [15 03] stack = 42, 12, 13, 42, 87, 42, 21, 0

ireturn [ac] stack = 42, 0, 1, 87, 42, 15

ireturn [ac] stack = 42

return value: 42

ijvm test.bc 42 87

Hvordan ser indholdet af lageret ud ved

programstart?

Caller's LV:

0

Caller's PC:

1

b:

87

a:

42

Link prt:

15

SP

LV

+2

+1

15

12

(42)

Store programmer

Man vil gerne anvende ''biblioteksmetoder''

...

// Integer multiplication.

.method imul

.args 3 // ( int x, int y ) .define x = 1 .define y = 2 .locals 1 // int p; .define p = 3 ldc_w 0 istore p // p = 0; while: // while iload x ifeq end_while // ( x > 0 ) // { iload x bipush 1 isub istore x // x = x - 1; iload p iload y iadd istore p // p = p + y; goto while // } end_while: iload p ireturn // return p; // My multiplication program .method main .args 3 .define a = 1 .define b = 2 bipush 88 iload a iload b invokevirtual calc ireturn .method calc .args 3 .define a = 1 .define b = 2 bipush 88 iload a iload b invokevirtual imul ldc_w 42 iadd

(43)

Mulig løsning

Lav et samlet program i

symbolsk maskinsprog, der kan

oversættes ...

Problemer

Kræver adgang til kildeteksten for

de anvendte biblioteksmetoder...

Biblioteksmetoder skal oversættes

hver gang der rettes i egen kode

...

// Integer multiplication .method imul

.args 3 // ( int x, int y ) .define x = 1 .define y = 2 .locals 1 // int p; .define p = 3 ldc_w 0 istore p // p = 0; ... ... // My multiplication program .method main .args 3 .define a = 1 .define b = 2 bipush 88 iload a iload b invokevirtual calc ireturn .method calc .args 3 .define a = 1 .define b = 2 bipush 88 iload a iload b invokevirtual imul ldc_w 42 iadd

ireturn // return a*b+42

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words 00000000

00000022 00000030 0000002a

Mulig løsning

Sammenkæd den oversattte

kode, maskinkoden, inden

indlæsning ...

(44)

Sammenkædning

Sammenkæd den oversatte kode, maskinkoden, inden

indlæsning ...

main index: ??

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000

Mangler

''imul''

Har ingen

main-metode

main index: 0

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 0000000e 0000002a

(45)

Sammenkædning

Sammenkæd den oversatte kode, maskinkoden, inden

indlæsning ...

main index: ??

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000

Mangler ''imul''

Har ingen main-metode

main index: 0

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 0000000e 0000002a

main index: 0

calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000 [ldc_w constant] 00000000 [.method imul]

(46)

Sammenkædning

main.o

bj

imul.o

bj

Linker

all.bc

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words 00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000 [ldc_w constant] 00000000 [.method imul]

(47)

Sammenkædning

main.o

bj

imul.o

bj

Linker

all.b

c

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words 00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000 [ldc_w constant] 00000000 [.method imul]

(48)

Sammenkædning

main.o

bj

imul.o

bj

Linker

all.b

c

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words 00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000 [ldc_w constant] 00000000 [.method imul]

(49)

Generelt eksempel

Hver oversat under antagelse af indlæsning fra

adresse 0 ...

Fire objekt-moduler skal

sammenkædes

(50)

Reallokeringsproblem

Absolutte referencer til

lageradresse skal

justeres jvf.

indlæsningsadresser ...

Eksterne referencer

Skal sættes jvf.

indlæsnings-adresser ...

(51)

IJVM eksempel

Linker

all.bc

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words 00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words 00000000 [ldc_w constant] 00000000 [.method imul]

(52)

IJVM eksempel

Linker

all.bc

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words

00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac

constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words

00000000 [ldc_w constant]

00000000 [.method imul]

Eksterne referencer sættes jvf. placering i fælles

''method area'' og ''constant pool'' ...

(53)

IJVM eksempel

Linker

all.bc

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words

00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac

constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words

00000000 [ldc_w constant]

00000000 [.method imul]

Startadresser for metoder i eget ''method area''

skal justeres i fælles ''constant pool'' jvf. placering

i fælles ''method area'' ...

(54)

Linker

all.bc

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words

00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac

constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words

00000000 [ldc_w constant]

00000000 [.method imul]

IJVM eksempel

Startadresser for metoder i eget ''method area''

skal justeres i fælles ''constant pool'' jvf. placering

i fælles ''method area'' ...

(55)

IJVM eksempel

Linker

all.bc

main index: 1

method area: 66 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac 00 03 00 00 10 58 15 01 15 02 b6 00 02 ac 00 03 00 00 10 58 15 01 15 02 b6 00 00 13 00 03 60 ac

constant pool: 4 words

00000000 00000022 00000030 0000002a main index: 0 calc index: 1

method area: 32 bytes

00 03 00 00 10 58 15 01 15 02 b6 00 01 ac 00 03 00 00 10 58 15 01 15 02 b6 ?? ?? 13 00 02 60 ac

constant pool: 3 words

00000000 [.method main]

0000000e [.method calc]

0000002a [ldc_w constant] external symbols:

.method imul [ 24: invokevirtual imul ]

imul index: 1

method area: 34 bytes

00 03 00 01 13 00 00 36 03 15 01 99 00 14 15 01 10 01 64 36 01 15 03 15 02 60 36 03 a7 ff ed 15 03 ac

constant pool: 1 words

00000000 [ldc_w constant]

00000000 [.method imul]

Referencer til egen ''constant pool'' (via

invokevirtual eller ldc_w) skal justeres jvf.

placering i fælles ''constant pool'' ...

References

Related documents

Spitalfields Music would like to thank the staff, parents and children from Kobi Nazrul and Shapla primary schools for their generosity and excitement in the delivery of this

As Braine's brain-child, he seems to announce most clearly the philosophy of the times." (Albert 574).' The novel depicts the hero’s protest against the

Guillaume and Kirtman (2010) found that the mathematics autobiographies of 144 preservice elementary teachers were mostly positive, but the participants did discuss the nature

[r]

To our knowledge, this study represents the first randomized controlled trial of a directly observed VA/D supplementation program in active pulmonary tubercu- losis patients

Also if an outlier moves from one cluster to another during iterations, it can have a major impact on the clusters because the means of the two clusters are likely to

We can assume that infections are locally contiguous and similar to the acute haematogenous prosthetic joint infection, surgical lavage, debridement and prosthesis retention

consistent i)attern of vertical distribution of the tungsten in the soil indicated that the tungsten had been transported from a source so me distance