The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 1 | Dalvik Virtual Machine |
| 2 | |
| 3 | |
| 4 | Source code rules of the road: |
| 5 | |
| 6 | - All externally-visible function names must start with "dvm" to avoid |
| 7 | namespace clashes. Use static functions when possible. |
| 8 | |
| 9 | - Do not create static variables (globally or locally). Do not create |
| 10 | global variables. Keep everything with non-local lifespan in "gDvm", |
| 11 | defined in Globals.h, so that all global VM state is in one place. |
| 12 | |
| 13 | - Use "startup" and "shutdown" functions to clean up gDvm. The VM must |
| 14 | exit cleanly in valgrind. |
| 15 | |
| 16 | - The primary target is ARM Linux. Others are secondary, but must still |
| 17 | work correctly. |
| 18 | |
| 19 | - Use of gcc-specific and C99 constructs is allowed. |