Update the interpretation of --target-api.

Change-Id: I4ab158384d09470d84097d944ae1ddadeb2ad045
am afe002d1: Update the interpretation of --target-api.

* commit 'afe002d1474d7c2ef2ac80de32f21f1949af2a41':
  Update the interpretation of --target-api.
Improve JNI indirect ref diagnostics

Improved CheckJNI problem detection and failure reporting.  Also,
the indirect reference table data structure now responds to invalid
requests with a magic bogus object instead of NULL, so that failures
are immediate and obvious.

The extended checks in the indirect ref implementation are still on,
mostly so that bad code fails in an obvious way even when CheckJNI
is not enabled.

This change also includes a hack to allow weak globals to work.
Returning non-NULL for invalid refs turned a rarely-fails-weirdly
issue into an always-fails-loudly, which is good, but we need to
paper over it until the WGR fix is in place.  This will need to be
removed later.

Also, reduced some log levels.

Bug 4184721

Change-Id: Iaec75c71dbc85934366be2e717329b635d0fa49e
Merge "Improve JNI indirect ref diagnostics"
am feeceefb: Merge "Improve JNI indirect ref diagnostics"

* commit 'feeceefbbe44a53e3d02812a126f93d3ef8ec37b':
  Improve JNI indirect ref diagnostics
Scale the card count by bits per byte to derive a bit vector length.

Change-Id: If3177d924193cd665f12758ce83f3be4cc5a66c8
Merge "Scale the card count by bits per byte to derive a bit vector length."
am 2f5e3cb2: Merge "Scale the card count by bits per byte to derive a bit vector length."

* commit '2f5e3cb20ed3fa00e474fb4813f2c1f46d04afd4':
  Scale the card count by bits per byte to derive a bit vector length.
Bug fix for rsubs being improperly generated.

This will miss some opportunities to generate rsubs, and has been marked
by a TODO note where code needs to be added.

Change-Id: I6dd2c7a5bb82294ee5f88ba41191e473133ed847
Compile the garbage collector and heap profiler as C++.

Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
Merge "Bug fix for rsubs being improperly generated." into dalvik-dev
Bug fix for rsubs being improperly generated.

This will miss some opportunities to generate rsubs, and has been marked
by a TODO note where code needs to be added.

Cherry-picked frmo dalvik-dev.

Change-Id: Iac272f16b78ab6d985b5aabef6bd360d36a5c7ce
am 9688de1e: Bug fix for rsubs being improperly generated.

* commit '9688de1ebc68f4f865a827709298390a72dff698':
  Bug fix for rsubs being improperly generated.
[JIT] Fix volatile test

On SMP systems, Dalvik opcodes referencing volatile fields will be
rewritten to their _VOLATILE variant.  On non-SMP systems, though,
this rewriting is not done.  The JIT, however, needs to know about
volatility for all systems in order to avoid performing unsafe
optimizations.  This change fixes the JIT's volatility test to be
either _VOLATILE opcode or the volatile flag in the field access bits
depending on SMP type.

Change-Id: If485875c5abbf0147c3ef4b6d557faa89ed85426
am 11fb99d5: [JIT] Fix volatile test

* commit '11fb99d598ebe640719743a0d3bd7ed091e5be03':
  [JIT] Fix volatile test
Updated dx to emit rsub instructions whenever it can.

Change-Id: I148c03fdc19dde8aece448e288d3c963490c9d0f
Fix method profiling [issue 4260697]

In the new interpreter control mechanism, method tracing invoke
events are generated at the call site, whereas debug entry events
happen prior to the interpretation of the first instruction of a
method.  Because we were failing to check for active profiling
on entry to a new interpreter instance, we would miss the profile
event for the first method interpreted.  We subsequently (and correctly)
recorded the return event, and ended up with a mismatch causing traceview
to complain and die.

Change-Id: Ibd93dfcd16c2f1fc62f6a86626a902eaf5d4b160
Revert "[JIT] Fix volatile test" - breaks build

This reverts commit 11fb99d598ebe640719743a0d3bd7ed091e5be03.
Merge "Updated dx to emit rsub instructions whenever it can." into dalvik-dev
am 80d118ae: Revert "[JIT] Fix volatile test" - breaks build

* commit '80d118aefbba31b7658299bf19f5ca72473390cd':
  Revert "[JIT] Fix volatile test" - breaks build