2 % FIXME: - Add something about size limits on the constant pool
3 % how we worked around that and the performance impact
5 % - Add something about encoding data sections as string constants
6 % and the UTF8 non-7-bit-ascii penalty
9 \documentclass[twocolumn]{article}
10 \usepackage{amssymb,amsmath,epsfig}
12 \sloppy % better line breaks
14 \def\twoauthors#1#2#3#4{\gdef\@address{}
19 \bibliographystyle{alpha}
21 \title{\textbf{\textsf{
22 Running Legacy C/C++ Libraries in a Pure Java Environment
25 \author{\begin{tabular}{@{}c@{}}
26 {\em {Adam Megacz}} \\ \\
27 {The XWT Foundation}\relax
28 \end{tabular}\hskip 1in\begin{tabular}{@{}c@{}}
29 {\em {Brian Alliet}} \\ \\
30 {{\it Affiliation Goes Here}}\relax
40 \section{Introduction}
42 \subsection{Why would you want to do this?}
46 \item untrusting servlet containers (mass hosting)
47 \item unsure of deployment architecture
48 \item JNI not available (ie J2ME)
50 \item security against buffer overflows
55 \section{Existing Work: Source-to-Source Translation}
57 \section{Mips2Java: Binary-to-Binary Translation}
59 \subsection{Why MIPS?}
61 \subsection{Interpreter}
65 \subsection{Advantages (over src2src)}
68 \item You get to use a {\it real} C/C++ compiler that's been tested
69 for over a decade; it won't choke on flaky code.
71 \item You can keep your existing build scripts and source layout (just
72 swap in the new compiler)
74 \item Zero post-translation tweaking means that you can change the
75 library (fix bugs, fix security holes, upgrade) without having
76 to remember what tweaks you made last time.
81 \subsection{Virtualization}
94 (Note that none of these libraries have pure-Java equivalents.)
102 \subsection{Optimizations}
106 \item optimal method size
110 \item local vars for registers (useless)
111 \item -fno-rename-registers
113 \item -fno-trapping-math
114 \item -fsingle-precision-constant
116 \item -freg-struct-return
117 \item -freduce-all-givs
120 \item -fmove-all-movables
121 \item -fno-sched-spec-load
122 \item -fno-sched-spec
123 \item -fno-schedule-insns
124 \item -fno-schedule-insns2
125 \item -fno-delayed-branch
126 \item -fno-function-cse
127 \item -ffunction-sections
128 \item -fdata-sections
129 \item array bounds checking
130 \item -falign-functions=n
131 \item -falign-labels=n
132 \item -falign-loops=n
133 \item -falign-jumps=n
134 \item -fno-function-cse
137 \section{Future Directions}