- branch optimization.
This commit is contained in:
parent
17d9a152e7
commit
77192fa9dd
4 changed files with 165 additions and 96 deletions
|
|
@ -734,6 +734,13 @@ void VMFunctionBuilder::Backpatch(size_t loc, size_t target)
|
|||
Code[loc].i24 = offset;
|
||||
}
|
||||
|
||||
void VMFunctionBuilder::BackpatchList(TArray<size_t> &locs, size_t target)
|
||||
{
|
||||
for (auto loc : locs)
|
||||
Backpatch(loc, target);
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// VMFunctionBuilder :: BackpatchToHere
|
||||
|
|
@ -748,6 +755,12 @@ void VMFunctionBuilder::BackpatchToHere(size_t loc)
|
|||
Backpatch(loc, Code.Size());
|
||||
}
|
||||
|
||||
void VMFunctionBuilder::BackpatchListToHere(TArray<size_t> &locs)
|
||||
{
|
||||
for (auto loc : locs)
|
||||
Backpatch(loc, Code.Size());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FFunctionBuildList
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue