21.01.2015 Views

Harpoon Project Compiler Intermediate Representation

Harpoon Project Compiler Intermediate Representation

Harpoon Project Compiler Intermediate Representation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

structor must be invoked using CALL in order<br />

to initialize the instance.<br />

NOP( ) Performs no operation.<br />

, F , G ) Performs operation ^ on the variables<br />

OPER(^<br />

in G list , storing the result F in . The operation<br />

is represented as a string; figure 3 lists all valid<br />

operation strings. The operations performed by<br />

the strings are identical to the operations performed<br />

by the Java bytecode operation of the<br />

same name, except that no exceptions are ever<br />

thrown. See [LY96] for details.<br />

, F\K , F V ) Sets field B of optional object F\K to<br />

SET(B<br />

the value F V of F\K . is not necessary for static<br />

fields.<br />

The harpoon.IR.QuadSSA.Code class provides<br />

a means to access the QuadSSA form of<br />

a given method; see the definition of superclass<br />

harpoon.ClassFile.HCode and the example<br />

code in harpoon.Main.Main for details.<br />

References<br />

[App98] Andrew W. Appel. Modern <strong>Compiler</strong> Implementation<br />

in Java. Cambridge University<br />

Press, 1998.<br />

[LY96] Tim Lindholm and Frank Yellin. The<br />

Java Virtual Machine Specification.<br />

Addison-Wesley, September 1996. Online<br />

at http://www.javasoft.com/<br />

docs/books/vmspec.<br />

5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!