MCPcopy Create free account
hub / github.com/beefytech/Beef / FindEmitEntry

Method FindEmitEntry

IDEHelper/Compiler/CeMachine.cpp:564–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562}
563
564CeEmitEntry* CeFunction::FindEmitEntry(int instIdx, int* entryIdx)
565{
566 int i = 0;
567 CeEmitEntry* emitEntry = NULL;
568
569 if (!mCode.IsEmpty())
570 {
571 int lo = 0;
572 int hi = mEmitTable.size() - 1;
573 while (lo <= hi)
574 {
575 i = (lo + hi) / 2;
576 emitEntry = &mEmitTable.mVals[i];
577 //int c = midVal <=> value;
578 if (emitEntry->mCodePos == instIdx) break;
579 if (emitEntry->mCodePos < instIdx)
580 lo = i + 1;
581 else
582 hi = i - 1;
583 }
584 if ((emitEntry != NULL) && (emitEntry->mCodePos > instIdx) && (i > 0))
585 {
586 emitEntry = &mEmitTable.mVals[i - 1];
587 if (entryIdx != NULL)
588 *entryIdx = i - 1;
589 }
590 else if (entryIdx != NULL)
591 *entryIdx = i;
592 }
593
594 return emitEntry;
595}
596
597// This is for "safe" retrieval from within CeDebugger
598int CeFunction::SafeGetId()

Callers 5

FailMethod · 0.80
SetupStepMethod · 0.80
GetAutoLocalsMethod · 0.80
UpdateCallStackMethod · 0.80
GetStackFrameInfoMethod · 0.80

Calls 2

IsEmptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected