Skip to content

Commit 4d8d4dc

Browse files
committed
Cleanup
1 parent 69bd75e commit 4d8d4dc

File tree

61 files changed

+3038
-9949
lines changed

Some content is hidden

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

61 files changed

+3038
-9949
lines changed

src/Xamarin.Android.Build.Tasks/Tasks/GenerateCompressedAssembliesNativeSourceFiles.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ void GenerateCompressedAssemblySources ()
7474

7575
void Generate (IDictionary<string, CompressedAssemblyInfo> dict)
7676
{
77-
var llvmAsmgen = new CompressedAssembliesNativeAssemblyGenerator (dict);
78-
llvmAsmgen.Init ();
79-
80-
var composer = new New.CompressedAssembliesNativeAssemblyGenerator (dict);
81-
LLVM.IR.LlvmIrModule compressedAssemblies = composer.Construct ();
77+
var composer = new CompressedAssembliesNativeAssemblyGenerator (dict);
78+
LLVMIR.LlvmIrModule compressedAssemblies = composer.Construct ();
8279

8380
foreach (string abi in SupportedAbis) {
8481
string baseAsmFilePath = Path.Combine (EnvironmentOutputDirectory, $"compressed_assemblies.{abi.ToLowerInvariant ()}");

src/Xamarin.Android.Build.Tasks/Tasks/GenerateJniRemappingNativeCode.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ public override bool RunTask ()
5454

5555
void GenerateEmpty ()
5656
{
57-
Generate (new New.JniRemappingAssemblyGenerator (), typeReplacementsCount: 0);
57+
Generate (new JniRemappingAssemblyGenerator (), typeReplacementsCount: 0);
5858
}
5959

6060
void Generate ()
6161
{
62-
var typeReplacements = new List<New.JniRemappingTypeReplacement> ();
63-
var methodReplacements = new List<New.JniRemappingMethodReplacement> ();
62+
var typeReplacements = new List<JniRemappingTypeReplacement> ();
63+
var methodReplacements = new List<JniRemappingMethodReplacement> ();
6464

6565
var readerSettings = new XmlReaderSettings {
6666
XmlResolver = null,
@@ -74,12 +74,12 @@ void Generate ()
7474
}
7575
}
7676

77-
Generate (new New.JniRemappingAssemblyGenerator (typeReplacements, methodReplacements), typeReplacements.Count);
77+
Generate (new JniRemappingAssemblyGenerator (typeReplacements, methodReplacements), typeReplacements.Count);
7878
}
7979

80-
void Generate (New.JniRemappingAssemblyGenerator jniRemappingComposer, int typeReplacementsCount)
80+
void Generate (JniRemappingAssemblyGenerator jniRemappingComposer, int typeReplacementsCount)
8181
{
82-
LLVM.IR.LlvmIrModule module = jniRemappingComposer.Construct ();
82+
LLVMIR.LlvmIrModule module = jniRemappingComposer.Construct ();
8383

8484
foreach (string abi in SupportedAbis) {
8585
string baseAsmFilePath = Path.Combine (OutputDirectory, $"jni_remap.{abi.ToLowerInvariant ()}");
@@ -99,7 +99,7 @@ void Generate (New.JniRemappingAssemblyGenerator jniRemappingComposer, int typeR
9999
);
100100
}
101101

102-
void ReadXml (XmlReader reader, List<New.JniRemappingTypeReplacement> typeReplacements, List<New.JniRemappingMethodReplacement> methodReplacements)
102+
void ReadXml (XmlReader reader, List<JniRemappingTypeReplacement> typeReplacements, List<JniRemappingMethodReplacement> methodReplacements)
103103
{
104104
bool haveAllAttributes;
105105

@@ -116,7 +116,7 @@ void ReadXml (XmlReader reader, List<New.JniRemappingTypeReplacement> typeReplac
116116
continue;
117117
}
118118

119-
typeReplacements.Add (new New.JniRemappingTypeReplacement (from, to));
119+
typeReplacements.Add (new JniRemappingTypeReplacement (from, to));
120120
} else if (String.Compare ("replace-method", reader.LocalName, StringComparison.Ordinal) == 0) {
121121
haveAllAttributes &= GetRequiredAttribute ("source-type", out string sourceType);
122122
haveAllAttributes &= GetRequiredAttribute ("source-method-name", out string sourceMethodName);
@@ -135,7 +135,7 @@ void ReadXml (XmlReader reader, List<New.JniRemappingTypeReplacement> typeReplac
135135

136136
string sourceMethodSignature = reader.GetAttribute ("source-method-signature");
137137
methodReplacements.Add (
138-
new New.JniRemappingMethodReplacement (
138+
new JniRemappingMethodReplacement (
139139
sourceType, sourceMethodName, sourceMethodSignature,
140140
targetType, targetMethodName, isStatic
141141
)

src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ void AddEnvironment ()
375375
bool haveRuntimeConfigBlob = !String.IsNullOrEmpty (RuntimeConfigBinFilePath) && File.Exists (RuntimeConfigBinFilePath);
376376
var appConfState = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal<ApplicationConfigTaskState> (ProjectSpecificTaskObjectKey (ApplicationConfigTaskState.RegisterTaskObjectKey), RegisteredTaskObjectLifetime.Build);
377377
var jniRemappingNativeCodeInfo = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal<GenerateJniRemappingNativeCode.JniRemappingNativeCodeInfo> (ProjectSpecificTaskObjectKey (GenerateJniRemappingNativeCode.JniRemappingNativeCodeInfoKey), RegisteredTaskObjectLifetime.Build);
378-
var appConfigAsmGen = new New.ApplicationConfigNativeAssemblyGenerator (environmentVariables, systemProperties, Log) {
378+
var appConfigAsmGen = new ApplicationConfigNativeAssemblyGenerator (environmentVariables, systemProperties, Log) {
379379
UsesMonoAOT = usesMonoAOT,
380380
UsesMonoLLVM = EnableLLVM,
381381
UsesAssemblyPreload = environmentParser.UsesAssemblyPreload,
@@ -394,7 +394,7 @@ void AddEnvironment ()
394394
// and up to 4 other for arch-specific assemblies. Only **one** arch-specific store is ever loaded on the app
395395
// runtime, thus the number 2 here. All architecture specific stores contain assemblies with the same names
396396
// and in the same order.
397-
MonoComponents = (New.MonoComponent)monoComponents,
397+
MonoComponents = (MonoComponent)monoComponents,
398398
NativeLibraries = uniqueNativeLibraries,
399399
HaveAssemblyStore = UseAssemblyStore,
400400
AndroidRuntimeJNIEnvToken = android_runtime_jnienv_class_token,
@@ -404,23 +404,23 @@ void AddEnvironment ()
404404
JniRemappingReplacementMethodIndexEntryCount = jniRemappingNativeCodeInfo == null ? 0 : jniRemappingNativeCodeInfo.ReplacementMethodIndexEntryCount,
405405
MarshalMethodsEnabled = EnableMarshalMethods,
406406
};
407-
LLVM.IR.LlvmIrModule appConfigModule = appConfigAsmGen.Construct ();
407+
LLVMIR.LlvmIrModule appConfigModule = appConfigAsmGen.Construct ();
408408

409409
var marshalMethodsState = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal<MarshalMethodsState> (ProjectSpecificTaskObjectKey (GenerateJavaStubs.MarshalMethodsRegisterTaskKey), RegisteredTaskObjectLifetime.Build);
410-
New.MarshalMethodsNativeAssemblyGenerator marshalMethodsAsmGenNew;
410+
MarshalMethodsNativeAssemblyGenerator marshalMethodsAsmGen;
411411

412412
if (enableMarshalMethods) {
413-
marshalMethodsAsmGenNew = new New.MarshalMethodsNativeAssemblyGenerator (
413+
marshalMethodsAsmGen = new MarshalMethodsNativeAssemblyGenerator (
414414
assemblyCount,
415415
uniqueAssemblyNames,
416416
marshalMethodsState?.MarshalMethods,
417417
Log,
418418
mmTracingMode
419419
);
420420
} else {
421-
marshalMethodsAsmGenNew = new New.MarshalMethodsNativeAssemblyGenerator (assemblyCount, uniqueAssemblyNames);
421+
marshalMethodsAsmGen = new MarshalMethodsNativeAssemblyGenerator (assemblyCount, uniqueAssemblyNames);
422422
}
423-
LLVM.IR.LlvmIrModule marshalMethodsModule = marshalMethodsAsmGenNew.Construct ();
423+
LLVMIR.LlvmIrModule marshalMethodsModule = marshalMethodsAsmGen.Construct ();
424424

425425
foreach (string abi in SupportedAbis) {
426426
string targetAbi = abi.ToLowerInvariant ();
@@ -443,7 +443,7 @@ void AddEnvironment ()
443443

444444
using (var sw = MemoryStreamPool.Shared.CreateStreamWriter ()) {
445445
try {
446-
marshalMethodsAsmGenNew.Generate (marshalMethodsModule, targetArch, sw, marshalMethodsLlFilePath);
446+
marshalMethodsAsmGen.Generate (marshalMethodsModule, targetArch, sw, marshalMethodsLlFilePath);
447447
} catch {
448448
throw;
449449
} finally {

0 commit comments

Comments
 (0)