DescriptionIntroduce per-isolate cache for compile time constants
Compile-time constant values are maintained in a cache, keyed
by script and token position. When the same code is compiled
again later, e.g. by the optimizing compiler, the value is
found in the cache and does not need to be computed again.
In this version, the key is a string concatenated from the
script url and the token position. That’s probably more overhead
than we want.
Added two compiler stat counters for number of cached constants
and number of cache hits. Running dart2js to compile a hello world
program results in about 1400 cached values and 85 cache hits.
BUG=
R=srdjan@google.com
Committed: https://github.com/dart-lang/sdk/commit/62e9d056681308fef71540300643db1a63639bc4
Patch Set 1 #
Total comments: 12
Patch Set 2 : Addressing review comments #
Messages
Total messages: 14 (4 generated)
|