Skip to content

Commit 4262c8e

Browse files
committed
rollback only one '.' changes
1 parent d8707c9 commit 4262c8e

12 files changed

+158
-159
lines changed

src/DotNet/Pdb/Portable/ImportScopeBlobWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static void Write(IWriterError helper, Metadata systemMetadata, DataWrite
2424

2525
uint WriteUTF8(string s) {
2626
if (s is null) {
27-
helper.Error("String is null.");
27+
helper.Error("String is null");
2828
s = string.Empty;
2929
}
3030
var bytes = Encoding.UTF8.GetBytes(s);
@@ -102,7 +102,7 @@ void Write(DataWriter writer, IList<PdbImport> imports) {
102102

103103
uint GetTypeDefOrRefEncodedToken(ITypeDefOrRef tdr) {
104104
if (tdr is null) {
105-
helper.Error("ITypeDefOrRef is null.");
105+
helper.Error("ITypeDefOrRef is null");
106106
return 0;
107107
}
108108
var token = systemMetadata.GetToken(tdr);

src/DotNet/Pdb/Portable/LocalConstantSigBlobWriter.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void Write(DataWriter writer, TypeSig type, object value) {
4444
if (value is float)
4545
writer.WriteSingle((float)value);
4646
else {
47-
helper.Error("Expected a Single constant.");
47+
helper.Error("Expected a Single constant");
4848
writer.WriteSingle(0);
4949
}
5050
return;
@@ -53,7 +53,7 @@ void Write(DataWriter writer, TypeSig type, object value) {
5353
if (value is double)
5454
writer.WriteDouble((double)value);
5555
else {
56-
helper.Error("Expected a Double constant.");
56+
helper.Error("Expected a Double constant");
5757
writer.WriteDouble(0);
5858
}
5959
return;
@@ -64,7 +64,7 @@ void Write(DataWriter writer, TypeSig type, object value) {
6464
else if (value is string)
6565
writer.WriteBytes(Encoding.Unicode.GetBytes((string)value));
6666
else
67-
helper.Error("Expected a String constant.");
67+
helper.Error("Expected a String constant");
6868
return;
6969

7070
case ElementType.Ptr:
@@ -99,7 +99,7 @@ void Write(DataWriter writer, TypeSig type, object value) {
9999
WriteTypeDefOrRef(writer, tdr);
100100
return;
101101
default:
102-
helper.Error("Invalid enum underlying type.");
102+
helper.Error("Invalid enum underlying type");
103103
return;
104104
}
105105
}
@@ -116,7 +116,7 @@ void Write(DataWriter writer, TypeSig type, object value) {
116116
writer.WriteInt32(bits[2]);
117117
}
118118
else {
119-
helper.Error("Expected a Decimal constant.");
119+
helper.Error("Expected a Decimal constant");
120120
writer.WriteBytes(new byte[13]);
121121
}
122122
valueWritten = true;
@@ -147,7 +147,7 @@ void Write(DataWriter writer, TypeSig type, object value) {
147147
if (value is byte[])
148148
writer.WriteBytes((byte[])value);
149149
else if (value is not null)
150-
helper.Error("Expected a null constant.");
150+
helper.Error("Expected a null constant");
151151
return;
152152

153153
case ElementType.CModReqd:
@@ -209,7 +209,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
209209
if (value is bool)
210210
writer.WriteBoolean((bool)value);
211211
else {
212-
helper.Error("Expected a Boolean constant.");
212+
helper.Error("Expected a Boolean constant");
213213
writer.WriteBoolean(false);
214214
}
215215
break;
@@ -218,7 +218,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
218218
if (value is char)
219219
writer.WriteUInt16((char)value);
220220
else {
221-
helper.Error("Expected a Char constant.");
221+
helper.Error("Expected a Char constant");
222222
writer.WriteUInt16(0);
223223
}
224224
break;
@@ -227,7 +227,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
227227
if (value is sbyte)
228228
writer.WriteSByte((sbyte)value);
229229
else {
230-
helper.Error("Expected a SByte constant.");
230+
helper.Error("Expected a SByte constant");
231231
writer.WriteSByte(0);
232232
}
233233
break;
@@ -236,7 +236,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
236236
if (value is byte)
237237
writer.WriteByte((byte)value);
238238
else {
239-
helper.Error("Expected a Byte constant.");
239+
helper.Error("Expected a Byte constant");
240240
writer.WriteByte(0);
241241
}
242242
break;
@@ -245,7 +245,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
245245
if (value is short)
246246
writer.WriteInt16((short)value);
247247
else {
248-
helper.Error("Expected an Int16 constant.");
248+
helper.Error("Expected an Int16 constant");
249249
writer.WriteInt16(0);
250250
}
251251
break;
@@ -254,7 +254,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
254254
if (value is ushort)
255255
writer.WriteUInt16((ushort)value);
256256
else {
257-
helper.Error("Expected a UInt16 constant.");
257+
helper.Error("Expected a UInt16 constant");
258258
writer.WriteUInt16(0);
259259
}
260260
break;
@@ -263,7 +263,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
263263
if (value is int)
264264
writer.WriteInt32((int)value);
265265
else {
266-
helper.Error("Expected an Int32 constant.");
266+
helper.Error("Expected an Int32 constant");
267267
writer.WriteInt32(0);
268268
}
269269
break;
@@ -272,7 +272,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
272272
if (value is uint)
273273
writer.WriteUInt32((uint)value);
274274
else {
275-
helper.Error("Expected a UInt32 constant.");
275+
helper.Error("Expected a UInt32 constant");
276276
writer.WriteUInt32(0);
277277
}
278278
break;
@@ -281,7 +281,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
281281
if (value is long)
282282
writer.WriteInt64((long)value);
283283
else {
284-
helper.Error("Expected an Int64 constant.");
284+
helper.Error("Expected an Int64 constant");
285285
writer.WriteInt64(0);
286286
}
287287
break;
@@ -290,7 +290,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
290290
if (value is ulong)
291291
writer.WriteUInt64((ulong)value);
292292
else {
293-
helper.Error("Expected a UInt64 constant.");
293+
helper.Error("Expected a UInt64 constant");
294294
writer.WriteUInt64(0);
295295
}
296296
break;
@@ -302,7 +302,7 @@ void WritePrimitiveValue(DataWriter writer, ElementType et, object value) {
302302

303303
void WriteTypeDefOrRef(DataWriter writer, ITypeDefOrRef tdr) {
304304
if (!MD.CodedToken.TypeDefOrRef.Encode(systemMetadata.GetToken(tdr), out uint codedToken)) {
305-
helper.Error("Couldn't encode a TypeDefOrRef.");
305+
helper.Error("Couldn't encode a TypeDefOrRef");
306306
return;
307307
}
308308
writer.WriteCompressedUInt32(codedToken);

src/DotNet/Pdb/Portable/PortablePdbCustomDebugInfoWriter.cs

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ byte[] Write(PdbCustomDebugInfo cdi) {
4242
case PdbCustomDebugInfoKind.IteratorMethod:
4343
case PdbCustomDebugInfoKind.SourceServer:
4444
default:
45-
helper.Error("Unreachable code, caller should filter these out.");
45+
helper.Error("Unreachable code, caller should filter these out");
4646
return null;
4747

4848
case PdbCustomDebugInfoKind.StateMachineHoistedLocalScopes:
@@ -98,7 +98,7 @@ byte[] Write(PdbCustomDebugInfo cdi) {
9898

9999
void WriteUTF8Z(string s) {
100100
if (s.IndexOf('\0') >= 0)
101-
helper.Error("String must not contain any NUL bytes.");
101+
helper.Error("String must not contain any NUL bytes");
102102
var bytes = Encoding.UTF8.GetBytes(s);
103103
writer.WriteBytes(bytes);
104104
writer.WriteByte(0);
@@ -121,14 +121,14 @@ void WriteStateMachineHoistedLocalScopes(PdbStateMachineHoistedLocalScopesCustom
121121
else {
122122
var startInstr = scope.Start;
123123
if (startInstr is null) {
124-
helper.Error("Instruction is null.");
124+
helper.Error("Instruction is null");
125125
return;
126126
}
127127
startOffset = methodContext.GetOffset(startInstr);
128128
endOffset = methodContext.GetOffset(scope.End);
129129
}
130130
if (startOffset > endOffset) {
131-
helper.Error("End instruction is before start instruction.");
131+
helper.Error("End instruction is before start instruction");
132132
return;
133133
}
134134
writer.WriteUInt32(startOffset);
@@ -139,7 +139,7 @@ void WriteStateMachineHoistedLocalScopes(PdbStateMachineHoistedLocalScopesCustom
139139
void WriteEditAndContinueLocalSlotMap(PdbEditAndContinueLocalSlotMapCustomDebugInfo cdi) {
140140
var d = cdi.Data;
141141
if (d is null) {
142-
helper.Error("Data blob is null.");
142+
helper.Error("Data blob is null");
143143
return;
144144
}
145145
writer.WriteBytes(d);
@@ -148,7 +148,7 @@ void WriteEditAndContinueLocalSlotMap(PdbEditAndContinueLocalSlotMapCustomDebugI
148148
void WriteEditAndContinueLambdaMap(PdbEditAndContinueLambdaMapCustomDebugInfo cdi) {
149149
var d = cdi.Data;
150150
if (d is null) {
151-
helper.Error("Data blob is null.");
151+
helper.Error("Data blob is null");
152152
return;
153153
}
154154
writer.WriteBytes(d);
@@ -157,7 +157,7 @@ void WriteEditAndContinueLambdaMap(PdbEditAndContinueLambdaMapCustomDebugInfo cd
157157
void WriteUnknown(PdbUnknownCustomDebugInfo cdi) {
158158
var d = cdi.Data;
159159
if (d is null) {
160-
helper.Error("Data blob is null.");
160+
helper.Error("Data blob is null");
161161
return;
162162
}
163163
writer.WriteBytes(d);
@@ -169,7 +169,7 @@ void WriteTupleElementNames(PortablePdbTupleElementNamesCustomDebugInfo cdi) {
169169
for (int i = 0; i < count; i++) {
170170
var name = cdiNames[i];
171171
if (name is null) {
172-
helper.Error("Tuple name is null.");
172+
helper.Error("Tuple name is null");
173173
return;
174174
}
175175
WriteUTF8Z(name);
@@ -179,7 +179,7 @@ void WriteTupleElementNames(PortablePdbTupleElementNamesCustomDebugInfo cdi) {
179179
void WriteDefaultNamespace(PdbDefaultNamespaceCustomDebugInfo cdi) {
180180
var ns = cdi.Namespace;
181181
if (ns is null) {
182-
helper.Error("Default namespace is null.");
182+
helper.Error("Default namespace is null");
183183
return;
184184
}
185185
var bytes = Encoding.UTF8.GetBytes(ns);
@@ -205,7 +205,7 @@ static byte ToByte(bool[] flags, int index) {
205205
void WriteEmbeddedSource(PdbEmbeddedSourceCustomDebugInfo cdi) {
206206
var d = cdi.SourceCodeBlob;
207207
if (d is null) {
208-
helper.Error("Source code blob is null.");
208+
helper.Error("Source code blob is null");
209209
return;
210210
}
211211
writer.WriteBytes(d);
@@ -214,7 +214,7 @@ void WriteEmbeddedSource(PdbEmbeddedSourceCustomDebugInfo cdi) {
214214
void WriteSourceLink(PdbSourceLinkCustomDebugInfo cdi) {
215215
var d = cdi.FileBlob;
216216
if (d is null) {
217-
helper.Error("Source link blob is null.");
217+
helper.Error("Source link blob is null");
218218
return;
219219
}
220220
writer.WriteBytes(d);
@@ -238,15 +238,15 @@ void WriteAsyncMethodSteppingInformation(PdbAsyncMethodCustomDebugInfo cdi) {
238238
for (int i = 0; i < count; i++) {
239239
var info = cdiStepInfos[i];
240240
if (info.YieldInstruction is null) {
241-
helper.Error("YieldInstruction is null.");
241+
helper.Error("YieldInstruction is null");
242242
return;
243243
}
244244
if (info.BreakpointMethod is null) {
245-
helper.Error("BreakpointMethod is null.");
245+
helper.Error("BreakpointMethod is null");
246246
return;
247247
}
248248
if (info.BreakpointInstruction is null) {
249-
helper.Error("BreakpointInstruction is null.");
249+
helper.Error("BreakpointInstruction is null");
250250
return;
251251
}
252252
uint yieldOffset = methodContext.GetOffset(info.YieldInstruction);
@@ -265,7 +265,7 @@ void WriteAsyncMethodSteppingInformation(PdbAsyncMethodCustomDebugInfo cdi) {
265265
uint GetOffsetSlow(MethodDef method, Instruction instr) {
266266
var body = method.Body;
267267
if (body is null) {
268-
helper.Error("Method has no body.");
268+
helper.Error("Method has no body");
269269
return uint.MaxValue;
270270
}
271271
var instrs = body.Instructions;
@@ -276,22 +276,22 @@ uint GetOffsetSlow(MethodDef method, Instruction instr) {
276276
return offset;
277277
offset += (uint)instr2.GetSize();
278278
}
279-
helper.Error("Couldn't find an instruction, maybe it was removed. It's still being referenced by some code or by the PDB.");
279+
helper.Error("Couldn't find an instruction, maybe it was removed. It's still being referenced by some code or by the PDB");
280280
return uint.MaxValue;
281281
}
282282

283283
void WriteCompilationMetadataReferences(PdbCompilationMetadataReferencesCustomDebugInfo cdi) {
284284
foreach (var mdRef in cdi.References) {
285285
var name = mdRef.Name;
286286
if (name is null) {
287-
helper.Error("Metadata reference name is null.");
287+
helper.Error("Metadata reference name is null");
288288
return;
289289
}
290290
WriteUTF8Z(name);
291291

292292
var aliases = mdRef.Aliases;
293293
if (aliases is null) {
294-
helper.Error("Metadata reference aliases is null.");
294+
helper.Error("Metadata reference aliases is null");
295295
return;
296296
}
297297
WriteUTF8Z(aliases);
@@ -306,11 +306,10 @@ void WriteCompilationMetadataReferences(PdbCompilationMetadataReferencesCustomDe
306306
void WriteCompilationOptions(PdbCompilationOptionsCustomDebugInfo cdi) {
307307
foreach (var kv in cdi.Options) {
308308
if (kv.Key is null) {
309-
helper.Error("Compiler option `key` is null.");
310309
return;
311310
}
312311
if (kv.Value is null) {
313-
helper.Error("Compiler option `value` is null.");
312+
helper.Error("Compiler option `value` is null");
314313
return;
315314
}
316315
WriteUTF8Z(kv.Key);

0 commit comments

Comments
 (0)