From bcea67136afb8f4ca52b0c45b4d24718d65d2a30 Mon Sep 17 00:00:00 2001 From: Man Wang Date: Tue, 11 Apr 2023 12:44:37 -0700 Subject: [PATCH] using global type analysis to remove duplicated null-check. Summary: as title Reviewed By: NTillmann Differential Revision: D44231591 fbshipit-source-id: bc78310a7b564acf572eeff10d4fbdb976c492e1 --- opt/type-analysis/GlobalTypeAnalysisPass.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/opt/type-analysis/GlobalTypeAnalysisPass.cpp b/opt/type-analysis/GlobalTypeAnalysisPass.cpp index 4b22ea8a5a..ca5fce0098 100644 --- a/opt/type-analysis/GlobalTypeAnalysisPass.cpp +++ b/opt/type-analysis/GlobalTypeAnalysisPass.cpp @@ -127,6 +127,7 @@ void GlobalTypeAnalysisPass::run_pass(DexStoresVector& stores, type_analyzer::Transform::NullAssertionSet null_assertion_set = kotlin_nullcheck_wrapper::get_kotlin_null_assertions(); + null_assertion_set.insert(method::redex_internal_checkObjectNotNull()); Scope scope = build_class_scope(stores); XStoreRefs xstores(stores); global::GlobalTypeAnalysis analysis(m_config.max_global_analysis_iteration);