Repository: dotnet/runtime
File: src/coreclr/jit/regallocwasm.h (C/C++)

Code before:
    bool isRegCandidate(LclVarDsc* varDsc);
    bool isContainableMemoryOp(GenTree* node);

private:
    LIR::Range& CurrentRange();

    void      IdentifyCandidates();
    void      InitializeCandidate(LclVarDsc* varDsc);
    void      InitializeStackPointer();
    void      AllocateStackPointer();
    void      AllocateFramePointer();
    regNumber AllocateVirtualRegister(var_types type);
    regNumber AllocateVirtualRegister(WasmValueType type);
    regNumber AllocateTemporaryRegister(var_types type);
    regNumber ReleaseTemporaryRegister(var_types type);
    regNumber ReleaseTemporaryRegister(WasmValueType wasmType);

    void      CollectReferences();
    void      CollectReferencesForBlock(BasicBlock* block);
    void      CollectReferencesForNode(GenTree* node);
    void      CollectReferencesForDivMod(GenTreeOp* divModNode);
    void      CollectReferencesForCall(GenTreeCall* callNode);
    void      CollectReferencesForCast(GenTreeOp* castNode);
    void      CollectReferencesForBinop(GenTreeOp* binOpNode);
    void      CollectReferencesForLclVar(GenTreeLclVar* lclVar);
    void      CollectReferencesForBlockStore(GenTreeBlk* node);
    void      RewriteLocalStackStore(GenTreeLclVarCommon* node);
    void      CollectReference(GenTree* node);
    void      RequestTemporaryRegisterForMultiplyUsedNode(GenTree* node);
    regNumber RequestInternalRegister(GenTree* node, var_types type);
    void      ConsumeTemporaryRegForOperand(GenTree* operand DEBUGARG(const char* reason));

    void ResolveReferences();

    void PublishAllocationResults();
};

using RegAllocImpl = WasmRegAlloc;


Review comment (suggestion):
```suggestion
    void      CollectReferencesForBlockStore(GenTreeBlk* node);
    void      CollectReferencesForLclVar(GenTreeLclVar* lclVar);
```
We're trying to match the decl and impl orders.

Code after:
    bool isRegCandidate(LclVarDsc* varDsc);
    bool isContainableMemoryOp(GenTree* node);

private:
    LIR::Range& CurrentRange();

    void      IdentifyCandidates();
    void      InitializeCandidate(LclVarDsc* varDsc);
    void      InitializeStackPointer();
    void      AllocateStackPointer();
    void      AllocateFramePointer();
    regNumber AllocateVirtualRegister(var_types type);
    regNumber AllocateVirtualRegister(WasmValueType type);
    regNumber AllocateTemporaryRegister(var_types type);
    regNumber ReleaseTemporaryRegister(var_types type);
    regNumber ReleaseTemporaryRegister(WasmValueType wasmType);

    void      CollectReferences();
    void      CollectReferencesForBlock(BasicBlock* block);
    void      CollectReferencesForNode(GenTree* node);
    void      CollectReferencesForDivMod(GenTreeOp* divModNode);
    void      CollectReferencesForCall(GenTreeCall* callNode);
    void      CollectReferencesForCast(GenTreeOp* castNode);
    void      CollectReferencesForBinop(GenTreeOp* binOpNode);
    void      CollectReferencesForBlockStore(GenTreeBlk* node);
    void      CollectReferencesForLclVar(GenTreeLclVar* lclVar);
    void      RewriteLocalStackStore(GenTreeLclVarCommon* node);
    void      CollectReference(GenTree* node);
    void      RequestTemporaryRegisterForMultiplyUsedNode(GenTree* node);
    regNumber RequestInternalRegister(GenTree* node, var_types type);
    void      ConsumeTemporaryRegForOperand(GenTree* operand DEBUGARG(const char* reason));

    void ResolveReferences();

    void PublishAllocationResults();
};

using RegAllocImpl = WasmRegAlloc;