DBC: Use type cache for more checks

Flutter layout benchmark ~10.5k us -> ~8.5k us for a total 1.76x improvement on the day =)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2410863004 .
This commit is contained in:
Zachary Anderson 2016-10-11 15:20:26 -07:00
parent bb85b32d51
commit da388d21c6

View file

@ -222,6 +222,9 @@ void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos,
SubtypeTestCache& test_cache = SubtypeTestCache::Handle();
if (!dst_type.IsVoidType() && dst_type.IsInstantiated()) {
test_cache = SubtypeTestCache::New();
} else if (!dst_type.IsInstantiated() &&
(dst_type.IsTypeParameter() || dst_type.IsType())) {
test_cache = SubtypeTestCache::New();
}
if (is_optimizing()) {