Skip to content

Commit cd1ada7

Browse files
ssj933meta-codesync[bot]
authored andcommitted
Promote redex-staging to redex-stable
Summary: allow-large-files run_all_fbandroid_tests run_all_fbandroid_tests_at_diff_time Sync redex-stable with the contents of redex-staging at revision 5b79daa4951d. Reviewed By: xuhdev Differential Revision: D102097160 fbshipit-source-id: df83f191cd135158de29bc4df7662330bfac5cc7
1 parent d7d3dad commit cd1ada7

729 files changed

Lines changed: 20492 additions & 6921 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ WarningsAsErrors: 'performance-*,readability-*,misc-definitions-in-headers,moder
3232
CheckOptions:
3333
- key: modernize-use-override.IgnoreDestructors
3434
value: 1
35+
- key: bugprone-signed-char-misuse.CharTypdefsToIgnore
36+
value: "int8_t"

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: cat /etc/os-release
2828
- name: Install prerequisites for checking out the repo
2929
run: apt-get update && apt-get install -y --no-install-recommends ca-certificates git-core
30-
- uses: actions/checkout@v4.1.1
30+
- uses: actions/checkout@v6
3131
- uses: "./.github/actions/prepare_debian"
3232
- uses: ./.github/actions/setup-build-and-test-w-make
3333
with:
@@ -53,7 +53,7 @@ jobs:
5353
- 19
5454
- 18
5555
steps:
56-
- uses: actions/checkout@v4.1.1
56+
- uses: actions/checkout@v6
5757
- uses: "./.github/actions/prepare_debian"
5858
with:
5959
install_clang_llvm_org: "${{ matrix.clang_version }}"
@@ -66,5 +66,5 @@ jobs:
6666
build-windows:
6767
runs-on: windows-latest
6868
steps:
69-
- uses: actions/checkout@v4.1.1
69+
- uses: actions/checkout@v6
7070
- uses: "./.github/actions/setup-build-and-test-windows"

.github/workflows/build_nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
build-windows-artifacts:
1212
runs-on: windows-latest
1313
steps:
14-
- uses: actions/checkout@v4.1.1
14+
- uses: actions/checkout@v6
1515
- uses: "./.github/actions/setup-build-and-test-windows"
16-
- uses: actions/upload-artifact@v4.0.0
16+
- uses: actions/upload-artifact@v6
1717
with:
1818
name: redex-windows
1919
retention-days: 7

.github/workflows/deploy-gh-pages.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
run:
1717
working-directory: website
1818
steps:
19-
- uses: actions/checkout@v4
20-
- uses: actions/setup-node@v4
19+
- uses: actions/checkout@v6
20+
- uses: actions/setup-node@v6
2121
with:
2222
node-version: 22
2323
cache: yarn
@@ -29,7 +29,7 @@ jobs:
2929
run: yarn build
3030

3131
- name: Upload GitHub Pages build artifacts
32-
uses: actions/upload-pages-artifact@v3
32+
uses: actions/upload-pages-artifact@v4
3333
with:
3434
path: website/build
3535

Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ libredex_la_SOURCES = \
152152
libredex/DexUtil.cpp \
153153
libredex/DexStoreUtil.cpp \
154154
libredex/DuplicateClasses.cpp \
155-
libredex/EditableCfgAdapter.cpp \
156155
libredex/FbjniMarker.cpp \
157156
libredex/FrameworkApi.cpp \
158157
libredex/FrequentlyUsedPointersCache.cpp \
@@ -226,7 +225,6 @@ libredex_la_SOURCES = \
226225
libredex/RefChecker.cpp \
227226
libredex/RemoveUninstantiablesImpl.cpp \
228227
libredex/Resolver.cpp \
229-
libredex/ScopedMetrics.cpp \
230228
libredex/Show.cpp \
231229
libredex/SourceBlockConsistencyCheck.cpp \
232230
libredex/SourceBlocks.cpp \
@@ -528,6 +526,7 @@ libopt_la_SOURCES = \
528526
opt/string_concatenator/StringConcatenator.cpp \
529527
opt/stringbuilder-outliner/StringBuilderOutliner.cpp \
530528
opt/strip-debug-info/StripDebugInfo.cpp \
529+
opt/optimize_resources/LowerResourceConstants.cpp \
531530
opt/optimize_resources/MaterializeResourceConstants.cpp \
532531
opt/optimize_resources/OptimizeResources.cpp \
533532
opt/typedef-anno-checker/TypedefAnnoCheckerPass.cpp \

RELEASE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-09-22
1+
2026-04-23

analysis/ip-reflection-analysis/IPReflectionAnalysis.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
#include "CallGraph.h"
1717
#include "ConfigFiles.h"
18-
#include "MethodOverrideGraph.h"
19-
#include "Resolver.h"
18+
#include "DexUtil.h"
2019
#include "Show.h"
2120
#include "SpartaInterprocedural.h"
2221

@@ -233,7 +232,7 @@ void IPReflectionAnalysisPass::run_pass(DexStoresVector& stores,
233232

234233
Scope scope = build_class_scope(stores);
235234
AnalysisParameters param;
236-
auto analysis = Analysis(scope, m_max_iteration, &param);
235+
auto analysis = Analysis(scope, static_cast<int>(m_max_iteration), &param);
237236
analysis.run();
238237
const auto& summaries = analysis.registry.get_map();
239238
m_result = std::make_shared<Result>();
@@ -247,7 +246,7 @@ void IPReflectionAnalysisPass::run_pass(DexStoresVector& stores,
247246

248247
for (const auto& entry : UnorderedIterable(*m_result)) {
249248
if (!entry.second.empty()) {
250-
file << show(entry.first) << " -> " << entry.second << std::endl;
249+
file << show(entry.first) << " -> " << entry.second << '\n';
251250
}
252251
}
253252
}

analysis/max-depth/MaxDepthAnalysis.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
#include <sparta/ConstantAbstractDomain.h>
1212
#include <sparta/HashedSetAbstractDomain.h>
1313

14-
#include "ControlFlow.h"
1514
#include "DexClass.h"
16-
#include "IRCode.h"
15+
#include "DexUtil.h"
16+
1717
#include "IRInstruction.h"
18+
#include "Resolver.h"
1819
#include "SpartaInterprocedural.h"
1920

2021
namespace {
@@ -143,7 +144,7 @@ class MaxDepthFunctionAnalyzer : public Base {
143144
void analyze_invoke(IRInstruction* insn) {
144145
auto* callee = insn->get_method();
145146
auto* callee_method =
146-
resolve_method(callee, opcode_to_search(insn), m_method);
147+
resolve_method_deprecated(callee, opcode_to_search(insn), m_method);
147148
if (callee_method != nullptr) {
148149
auto summary =
149150
this->get_summaries()->get(callee_method, DepthDomain::top());
@@ -186,13 +187,16 @@ using Analysis = InterproceduralAnalyzer<MaxDepthAnalysisAdaptor>;
186187
void MaxDepthAnalysisPass::run_pass(DexStoresVector& stores,
187188
ConfigFiles& /* conf */,
188189
PassManager& /* pm */) {
189-
auto analysis = Analysis(build_class_scope(stores), m_max_iteration);
190+
auto analysis =
191+
Analysis(build_class_scope(stores), static_cast<int>(m_max_iteration));
190192
analysis.run();
191193
m_result = std::make_shared<UnorderedMap<const DexMethod*, int>>();
192194

193195
for (const auto& entry : UnorderedIterable(analysis.registry.get_map())) {
194196
if (entry.second.is_value()) {
195-
(*m_result)[entry.first] = entry.second.depth();
197+
auto depth = entry.second.depth();
198+
always_assert(depth <= std::numeric_limits<int>::max());
199+
(*m_result)[entry.first] = static_cast<int>(depth);
196200
}
197201
}
198202
}

checkers/DexLimitsChecker.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ std::string print_new_entries(const dex_data_map_t& old_map_vec,
104104
// and only translate them when we find an issue.
105105
UnorderedSet<DexFieldRef*> fields;
106106
UnorderedSet<DexMethodRef*> methods;
107-
UnorderedSet<DexType*> types;
107+
UnorderedSet<const DexType*> types;
108108
// Share memory. Lifetimes are OK because confined to this function.
109-
const UnorderedSet<DexType*>& pending_init_class_fields;
110-
const UnorderedSet<DexType*>& pending_init_class_types;
109+
const UnorderedSet<const DexType*>& pending_init_class_fields;
110+
const UnorderedSet<const DexType*>& pending_init_class_types;
111111

112112
DexDataWithSet(UnorderedSet<DexFieldRef*> f,
113113
UnorderedSet<DexMethodRef*> m,
114-
UnorderedSet<DexType*> t,
115-
const UnorderedSet<DexType*>& p_f,
116-
const UnorderedSet<DexType*>& p_t)
114+
UnorderedSet<const DexType*> t,
115+
const UnorderedSet<const DexType*>& p_f,
116+
const UnorderedSet<const DexType*>& p_t)
117117
: fields(std::move(f)),
118118
methods(std::move(m)),
119119
types(std::move(t)),

checkers/DexLimitsChecker.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class DexLimitsChecker : public PropertyChecker {
3131
// and only translate them when we find an issue.
3232
std::vector<DexFieldRef*> fields;
3333
std::vector<DexMethodRef*> methods;
34-
std::vector<DexType*> types;
34+
std::vector<const DexType*> types;
3535
// These are hopefully small and transitioning is annoying.
36-
UnorderedSet<DexType*> pending_init_class_fields;
37-
UnorderedSet<DexType*> pending_init_class_types;
36+
UnorderedSet<const DexType*> pending_init_class_fields;
37+
UnorderedSet<const DexType*> pending_init_class_types;
3838
};
3939

4040
UnorderedMap<std::string, std::vector<DexData>> m_data;

0 commit comments

Comments
 (0)