Deletes DevMode specific linker hacks.

Change-Id: I4087ebc291a7f6dc219c93902f6b9429be5bf8d3
Makes sure StackTraceDeobfuscator respects file name.

We should trust the file name if it is a java file name as that means
compiler.stackMode is enabled. (Stack emulation always has the correct
file name unlike the Symbol map as it will incorrectly deobfuscate
anonymous functions in JSNI.)

Change-Id: Iefbc6cf1d3bb42fced46f2e5a4bd3ba74e6b3035
Implement new Java 8 java.lang.Boolean API.

Change-Id: I43a6f602d7a73053ec61a34cd6e9789ec9f921f8
Introduces @HasNoSideEffects compiler hint.

This compiler hint can be used in cases where it is not
trivial for the compiler to detect that a method is side
effect free, hence can be removed if return value is not
used.

This is useful for removing precondtions related code when
preconditions are disabled. For example:

 @HasNoSideEffects
 private boolean someComplexMethodForCheckingArg(..) {
  ...
 }

 checkArgument(someComplexMethodForCheckingArg(arg));

In this example checkArgument will eventually get inlined and
will be no-op but if the someComplexMethodForCheckingArg is not
inlinable then the compiler will not be able to remove the call
to it as it might have side effects.

Even the compiler one day implements analysis to check side effect,
a lot of cases will still be uncovered because it is infeasible to
prove the underlying code will not throw if some arguments and 
method calls are involved.

As this hint is very unsafe, it is not provided as a public API.

Change-Id: I75c15939b0f274fa4540cbf12586db0e126cb316
Review-Link: https://gwt-review.googlesource.com/#/c/10264/
introduce PersistentUnitCacheDir

Refactors PersistentUnitCache to move all I/O operations on files or
directories to PersistentUnitCacheDir.

Also,
  - inline a couple of tasks that are only called once.
  - add better logging to the unit tests.

Change-Id: I62d2b2f105c898d8053e74fb11f0d15445f3856d
Review-Link: https://gwt-review.googlesource.com/#/c/10310/
Log and skip init of synthetic keyboard events for IE11

We don't have a solution synthetic keyboard events in IE11
so this patch changes it to skip the initialization and log
the issue instead of throwing an exception.

Bug: issue 8463
Change-Id: I8230e542c7a6ec74418d62f6c4b3aadf41de59e1
Review-Link: https://gwt-review.googlesource.com/#/c/10202/
Ensures EntryMethods are traversed first.

Previously GWT happened to process GWT.create() calls in EntryMethods, 
before GWT.create() calls in other places. This was never promised 
behavior but some apps now depend on it.

This change ensures that this behavior is honored even within the new 
incremental compile path.

Change-Id: Id36e91fa455fd95394a6a02ab0356de7053890a6
Review-Link: https://gwt-review.googlesource.com/#/c/10410/
Fix log spam in PersistentUnitCache.cleanup

Change-Id: I8ebebfc4e5b35f441e959ab648e9ab48f8234357
Removes namespace for removed com.google.gwt.widget

Change-Id: If3bc68f9e7537b24f1a571302b7c166ddf06f583
Fix small typo

Change-Id: I1c76aadcc6de8cb24dcb3e7c2cee61998b6793f3
Fixes an inconsistency that resulted in a bad AST.

In some cases the Pruner would leave the AST in an incosistent form
where there is a JNewInstance poiting to a JConstructor that is has
been already removed from the correspoinding class.

Suprisingly most passes seem not to care as, in fact, this constructor
is actually unreachable. However, under the correct (or should I say
wrong) circumstances MethodInliner fails due to inconsistent
expectations about the parameters of the method it inlines.

This patch also adds a verification stage after each transformation
in the optimization loop that is only run when assertions are enabled.

Change-Id: Iabcc6d4247205f6097e514d33a14bd4a1e9924a9
Introduce MetricMap as a way of exporting compiler metrics

Any method that has a TreeLogger can export a metric by calling
setAmount(). These metrics are exported by Super Dev Mode inside
each JobEvent.

Started with one metric for DeclaredTypesInModule as proof of
concept.

Also, fixed error-handling bugs in Super Dev Mode:
 - JobEvent VALID_TAG regular expression was incorrect.
 - If a Job failed with a RuntimeException that happened outside the
compiler, the stack trace was not being logged and the job would
never complete.

Clean up:
 - JobEvent was exposing the rebased ImmutableList class
 - JobRunner had an unused dependency on OutboxTable

Change-Id: Icb6f7e457c6d9b3b7de341a21b18b2ea0d505177
Review-Link: https://gwt-review.googlesource.com/#/c/9862/
Introduce PersistentUnitCache.BackgroundService

Moved all async operations to it.

Separated out the operations that update the memory cache
from those that update the disk cache.

Refactored and commented the code that loads units from the
disk cache.

Improved tracing.

Change-Id: I1f91ff9261e6a988e0bc6efba9fe444773dc159d
Review-Link: https://gwt-review.googlesource.com/#/c/10440/
Revert "Introduce PersistentUnitCache.BackgroundService"

This reverts commit bf556abdfb0cef9d2e49e20d27bab0bd221ebfb7.

Adding synchronization introduced deadlock

Change-Id: Ie0d030dcb2ed683962d2ca44bc308d2b1bd8da04
Introduce PersistentUnitCache.BackgroundService

Moved all async operations to it.

Separated out the operations that update the memory cache
from those that update the disk cache.

Refactored and commented the code that loads units from the
disk cache.

Improved tracing.

Change-Id: I170c80c717a6b224c526bd188f21ef83c4de8dc5
Removes StringCase and replaces all Locale.ENGLISH with ROOT

As we added String#toUpperCase(Locale)/toLowerCase(Locale) emulation
to GWT, we no longer need a super-sourced StringCase utility class.

I also switched all uses of Locale.ENGLISH to Locale.ROOT which is
the 'neutral' locale for locale sensitive operations.

Change-Id: I007eba55e8091564b82f81c37a1ca8c5f73c1fec
Reduces incremental output size ~23%.

Starts obfuscating just function names. As a result function names are
smaller and with sourcemaps are still mostly readable.

Change-Id: I3481fe937d26af0ced27f5fc59e2c50f00f3e947
Review-Link: https://gwt-review.googlesource.com/#/c/10452/
Reuses caches on SDM relaunch, makes first compile ~4x faster.

Previously MinimalRebuildCache instances were not persisted or loaded
from disk at all and a new PersistentUnitCache was built from scratch
for each SDM launch.

Now SDM takes care to choose a location for its PersistentUnitCache in
a way that will be consistent when SDM is relaunched in the same project
and targetting the same module.

Going further MinimalRebuildCache instances are now read from disk at
the beginning and persisted to disk after every compile. Similarly these
cache instances are saved to a folder whose name is consistent for the
same project and module and are saved to a file named consistently using
a combination of project, module and compiler version.

Because these caches are tied to the compiler version and because the
managed objects are tied to .java class modification dates, they should
always be correct. But in the event that something does become corrupt
there is now a SDM button to clear disk caches.

Change-Id: Ib995c18fe6842dc8914457ceff43e17808bfa550
Review-Link: https://gwt-review.googlesource.com/#/c/9450/