Repository: dotnet/runtime
File: src/coreclr/jit/codegencommon.cpp (C++)

Code before:
    return genAsyncResumeInfoTableOffset;
}

//----------------------------------------------------------------------------------
// genEmitAsyncResumeInfo:
//   Obtain a pseudo-CORINFO_FIELD_HANDLE describing how to access the async
//   resume information for a specific state number.
//
// Arguments:
//    stateNum - The state
//
// Return Value:
//    CORINFO_FIELD_HANDLE encoding access of read-only data at a specific
//    offset.
//
CORINFO_FIELD_HANDLE CodeGen::genEmitAsyncResumeInfo(unsigned stateNum)
{
    assert(compiler->compSuspensionPoints != nullptr);
    assert(stateNum < compiler->compSuspensionPoints->size());

    emitter::dataSection* dataSection;
    UNATIVE_OFFSET        baseOffs = genEmitAsyncResumeInfoTable(&dataSection);
    return compiler->eeFindJitDataOffs(baseOffs + stateNum * sizeof(CORINFO_AsyncResumeInfo));
}

#endif // TARGET_WASM

//------------------------------------------------------------------------
// getCallTarget - Get the node that evaluates to the call target
//
// Arguments:
//    call - the GT_CALL node
//
// Returns:
//   The node. Note that for direct calls this may still return non-null if the direct call
//   requires a 'complex' tree to load the target (e.g. in R2R or because we go through a stub).
//
GenTree* CodeGen::getCallTarget(const GenTreeCall* call, CORINFO_METHOD_HANDLE* methHnd)
{
    // all virtuals should have been expanded into a control expression by this point.
    assert(!call->IsVirtual() || call->gtControlExpr || call->gtCallAddr);

    if (call->gtCallType == CT_INDIRECT)
    {
        assert(call->gtControlExpr == nullptr);

        if (methHnd != nullptr)
        {
            *methHnd = nullptr;
        }


Review comment (bug):
The endif comment is incorrect. The opening directive at line 5641 is "#if !defined(TARGET_WASM)" so the comment should be "#endif // !TARGET_WASM" not "#endif // TARGET_WASM".
```suggestion
#endif // !TARGET_WASM
```

Code after:
    return genAsyncResumeInfoTableOffset;
}

//----------------------------------------------------------------------------------
// genEmitAsyncResumeInfo:
//   Obtain a pseudo-CORINFO_FIELD_HANDLE describing how to access the async
//   resume information for a specific state number.
//
// Arguments:
//    stateNum - The state
//
// Return Value:
//    CORINFO_FIELD_HANDLE encoding access of read-only data at a specific
//    offset.
//
CORINFO_FIELD_HANDLE CodeGen::genEmitAsyncResumeInfo(unsigned stateNum)
{
    assert(compiler->compSuspensionPoints != nullptr);
    assert(stateNum < compiler->compSuspensionPoints->size());

    emitter::dataSection* dataSection;
    UNATIVE_OFFSET        baseOffs = genEmitAsyncResumeInfoTable(&dataSection);
    return compiler->eeFindJitDataOffs(baseOffs + stateNum * sizeof(CORINFO_AsyncResumeInfo));
}

#endif // !TARGET_WASM

//------------------------------------------------------------------------
// getCallTarget - Get the node that evaluates to the call target
//
// Arguments:
//    call - the GT_CALL node
//
// Returns:
//   The node. Note that for direct calls this may still return non-null if the direct call
//   requires a 'complex' tree to load the target (e.g. in R2R or because we go through a stub).
//
GenTree* CodeGen::getCallTarget(const GenTreeCall* call, CORINFO_METHOD_HANDLE* methHnd)
{
    // all virtuals should have been expanded into a control expression by this point.
    assert(!call->IsVirtual() || call->gtControlExpr || call->gtCallAddr);

    if (call->gtCallType == CT_INDIRECT)
    {
        assert(call->gtControlExpr == nullptr);

        if (methHnd != nullptr)
        {
            *methHnd = nullptr;
        }