* add thread safety

* add pulse resource leaks, remove old tests

* pulse taint tests

* changes

* progress

* remove description

* example report

* revert exmaple changes

* revert changes
This commit is contained in:
Matthew Jin 2022-09-15 13:33:02 -07:00 коммит произвёл GitHub
Родитель 2314021564
Коммит d9878786ce
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 6 добавлений и 23 удалений

Просмотреть файл

@ -581,9 +581,7 @@ namespace Cilsil.Cil.Parsers
{
var type = Typ.FromTypeReference(newObjectReference);
var newObjectIdentifier = state.GetIdentifier(
Identifier.IdentKind.Normal,
description: $"output of {type.StripPointer()}::.ctor() at " +
$"{state.CurrentLocation}");
Identifier.IdentKind.Normal);
var callFlags = new Call.CallFlags(isVirtual: false,
noReturn: false,
isObjCBlock: false);
@ -722,10 +720,7 @@ namespace Cilsil.Cil.Parsers
.Select(p => new Call.CallArg(p.Item1, p.Item2))
.ToList());
var callFlags = new Call.CallFlags(isVirtual, false, false);
returnVariable = state.GetIdentifier(Identifier.IdentKind.Normal,
description: "returned from " +
calledMethod.GetCompatibleFullName() +
$" at {state.CurrentLocation}");
returnVariable = state.GetIdentifier(Identifier.IdentKind.Normal);
methodCall = new Call(returnId: returnVariable,
returnType: Typ.FromTypeReference(returnType),
functionExpression: funcExp,

Просмотреть файл

@ -56,8 +56,7 @@ namespace Cilsil.Cil.Parsers
}
var fieldExpression = CreateFieldExpression(fieldOwnerExpression, field);
// An identifier to store the field expression.
var fieldIdentifier = state.GetIdentifier(Identifier.IdentKind.Normal,
description: $"{fieldExpression}");
var fieldIdentifier = state.GetIdentifier(Identifier.IdentKind.Normal);
fieldType = Typ.FromTypeReferenceNoPointer(field.FieldType);

Просмотреть файл

@ -79,12 +79,6 @@ namespace Cilsil.Sil
[JsonProperty]
public int Stamp { get; set; }
/// <summary>
/// Describes the identifier for better warning capabilities.
/// </summary>
[JsonProperty]
public string Description { get; set; } = string.Empty;
/// <summary>
/// Converts to string.
/// </summary>

Просмотреть файл

@ -217,8 +217,7 @@ namespace Cilsil.Sil.Types
/// identifier in which the expression is stored.</returns>
public (Load, Identifier) LoadValue(ProgramState state)
{
var expressionIdentifier = state.GetIdentifier(Identifier.IdentKind.Normal,
description: $"{Value}");
var expressionIdentifier = state.GetIdentifier(Identifier.IdentKind.Normal);
return (new Load(expressionIdentifier, Value, Type, state.CurrentLocation),
expressionIdentifier);
}

Просмотреть файл

@ -317,8 +317,7 @@ namespace Cilsil.Utils
/// <returns>The <see cref="Load"/> instruction created from the inputs.</returns>
public Load PushAndLoad(Expression expression, Typ type)
{
var freshIdentifier = GetIdentifier(Identifier.IdentKind.Normal,
description: $"{expression}");
var freshIdentifier = GetIdentifier(Identifier.IdentKind.Normal);
var isThis = false;
if (expression is LvarExpression variable && variable.Pvar.PvName == "this")
{
@ -334,17 +333,14 @@ namespace Cilsil.Utils
/// <param name="kind">The type of identifier to be created.</param>
/// <param name="name">The name of the identifier to be created. Defaults to a standard
/// type-dependent name.</param>
/// <param name="description">Description of the identifier, for providing more warning
/// information.</param>
/// <returns>The new identifier.</returns>
public Identifier GetIdentifier(
Identifier.IdentKind kind, string name = null, string description = null) =>
Identifier.IdentKind kind, string name = null) =>
new Identifier()
{
Kind = kind,
Name = name ?? Identifier.StandardNames[kind],
Stamp = NextAvailableTemporaryVariableId++,
Description = description ?? string.Empty
};
/// <summary>