Repository: dotnet/runtime
File: src/coreclr/tools/Common/Compiler/DependencyAnalysis/Target_Wasm/WasmTypeNode.cs (C#)

Code before:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Linq;
using ILCompiler.DependencyAnalysis;
using Internal.JitInterface;

namespace ILCompiler.DependencyAnalysis.Wasm
{
    public class WasmTypeNode : ObjectNode
    {
        private readonly CorInfoWasmType[] _types;

        public WasmTypeNode(CorInfoWasmType[] types)
        {
            _types = types;
        }

        public override bool IsShareable => true;

        public override int ClassCode => -45678931;

        public override bool StaticDependenciesAreComputed => true;

        public override ObjectNodeSection GetSection(NodeFactory factory) => ObjectNodeSection.WasmTypeSection;

        protected override string GetName(NodeFactory factory)
            => $"Wasm Type ({string.Join(",", _types.Skip(1))}) -> {_types.FirstOrDefault()}";

        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
            => new ObjectData(
                Array.Empty<byte>(),
                Array.Empty<Relocation>(),
                1,
                Array.Empty<ISymbolDefinitionNode>());

        public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
        {
            var wtm = (WasmTypeNode)other;

Review comment (suggestion):
```suggestion
    //
    // Represents a WASM type signature, e. g. "(i32, i32) -> (i64)". Used as the relocation target for things like 'call_indirect'.
    // Currently can only represent one return type (it is always the first type in the array).
    //
    public class WasmTypeNode : ObjectNode
```


Code after:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Linq;
using ILCompiler.DependencyAnalysis;
using Internal.JitInterface;

namespace ILCompiler.DependencyAnalysis.Wasm
{
    //
    // Represents a WASM type signature, e.g. "(i32, i32) -> (i64)". Used as a relocation target for things like 'call_indirect'.
    // Does not currently support multiple return values; the return type is always the first type in the array and may be Void.
    //
    public class WasmTypeNode : ObjectNode
    {
        private readonly CorInfoWasmType[] _types;

        public WasmTypeNode(CorInfoWasmType[] types)
        {
            _types = types;
        }

        public override bool IsShareable => true;

        public override int ClassCode => -45678931;

        public override bool StaticDependenciesAreComputed => true;

        public override ObjectNodeSection GetSection(NodeFactory factory) => ObjectNodeSection.WasmTypeSection;

        protected override string GetName(NodeFactory factory)
            => $"Wasm Type ({string.Join(",", _types.Skip(1))}) -> {_types.FirstOrDefault()}";

        public override ObjectData GetData(NodeFactory factory, bool relocsOnly = false)
            => new ObjectData(
                Array.Empty<byte>(),
                Array.Empty<Relocation>(),
                1,
                Array.Empty<ISymbolDefinitionNode>());