Cleanup resolution of type, field, method indexes

When resolving a type_idx of a static field, you cannot assume the
type_idx refers to the class that actually provides the storage, it
might be a subclass. The compiler now resolves to the storage class if
possible at compile time, otherwise it reverts to the slow path.

When resolve field and method indexes, you need to know if a field is
static or instance and if a method is direct or virtual. Previously we
tried to guess, which led to problems in classes that had one of
each. Now the compiler resolves which kind of field and method based
on the context of class definitions and dex instructions.

Change-Id: I31826dc90562057eadd81f39d6369aa1216509af
9 files changed
tree: 2fc5c0f3fa40a491a3467dfc25d71fc2e23058f1
  2. build/
  3. src/
  4. test/
  5. tools/