Fragile native compilation of virtual machine code is described, in which
a native code optimizer inspects external code entities such as Java base classes
and emits target code based on an inter-procedural analysis of the code and data
structure invariants and other properties of the external code entity. The fragile
compiler also records which properties of the external code entities were used
to produce the optimized code in a "fragile set", so that the virtual machine at
which the compiled code is deployed and executed can detect if the recorded properties
of the external code entities are compatible with the properties of the corresponding
entities on the deployment virtual machine. If the code entities are incompatible,
the compiled native code is rejected and the virtual machine reverts to interpreting
the virtual machine code.