Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
51b978d
Remove SPILLED JitDisasm in favor of JitDisasmSpilled
jakobbotsch Aug 23, 2022
8100597
JIT: Simplify MethodSet matching behavior
jakobbotsch Aug 23, 2022
efdc84a
Update docs, minor nits
jakobbotsch Aug 23, 2022
a2af04b
Merge branch 'main' of github.com:dotnet/runtime into jit-method-name…
jakobbotsch Aug 23, 2022
dc67a40
Apply suggestions from code review
jakobbotsch Aug 24, 2022
03a1fa7
Update docs/design/coreclr/jit/viewing-jit-dumps.md
jakobbotsch Aug 25, 2022
4ded1a9
Use appendClassName to get namespaces and generic instantiations
jakobbotsch Aug 31, 2022
4dcce2a
Format instantiations in JIT
jakobbotsch Sep 1, 2022
510e5ec
Minor adjustments
jakobbotsch Sep 1, 2022
da27ae0
Add method instantiations
jakobbotsch Sep 1, 2022
55693f3
Update docs
jakobbotsch Sep 1, 2022
e9e6e06
Go back to square brackets
jakobbotsch Sep 1, 2022
daf08e4
Congruence
jakobbotsch Sep 1, 2022
633fa76
Single quotes
jakobbotsch Sep 1, 2022
2764293
Add some SPMI error traps
jakobbotsch Sep 1, 2022
0748742
Switch vsnprintf_s -> _vsnprintf_s, move StringPrinter::Printf to cpp…
jakobbotsch Sep 1, 2022
5de9b29
Another compilation fix
jakobbotsch Sep 1, 2022
98eee9f
Change crossgen2/ILC to fill in instantiations always
jakobbotsch Sep 2, 2022
bebe9f4
Fix a couple more angle brackets, add some braces to single line ifs
jakobbotsch Sep 2, 2022
0cf37d7
Make globbing quadratic instead of exponential
jakobbotsch Sep 2, 2022
68dfcda
Use asCorInfoType instead of getTypeForPrimitiveValueClass
jakobbotsch Sep 2, 2022
a94ac52
Run jit-format
jakobbotsch Sep 2, 2022
b0d00ac
Merge branch 'main' of github.com:dotnet/runtime into jit-method-name…
jakobbotsch Sep 2, 2022
a3f01e9
SPMI: Fix getTypeInstantiationArgument
jakobbotsch Sep 2, 2022
ae673c1
Bump JIT-EE GUID
jakobbotsch Sep 2, 2022
a8737b3
Add header comments, rename some parameters
jakobbotsch Sep 2, 2022
4507256
Apply suggestions from code review
jakobbotsch Sep 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make globbing quadratic instead of exponential
  • Loading branch information
jakobbotsch committed Sep 2, 2022
commit 0cf37d75f809ecd999b56b8f1daef15f4da77735
49 changes: 24 additions & 25 deletions src/coreclr/jit/jitconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,43 +101,42 @@ void JitConfigValues::MethodSet::destroy(ICorJitHost* host)

static bool matchGlob(const char* pattern, const char* patternEnd, const char* str)
{
// Invariant: [stringStart..backtrackStr) matches [patternStart..backtrackPattern)
const char* backtrackPattern = nullptr;
const char* backtrackStr = nullptr;

while (true)
{
if (pattern == patternEnd)
{
return *str == '\0';
if (*str == '\0')
return true;
}

if (*pattern == '*')
else if (*pattern == '*')
{
while (true)
{
if (matchGlob(pattern + 1, patternEnd, str))
{
return true;
}

if (*str == '\0')
{
return false;
}

str++;
}
backtrackPattern = ++pattern;
backtrackStr = str;
continue;
}

if (*str == '\0')
else if (*str == '\0')
{
return false;
// No match since pattern needs at least one char in remaining cases.
}

if ((*pattern != '?') && (*pattern != *str))
else if ((*pattern == '?') || (*pattern == *str))
{
return false;
pattern++;
str++;
continue;
}

pattern++;
str++;
// In this case there was no match, see if we can backtrack to a wild
// card and consume one more character from the string.
if ((backtrackPattern == nullptr) || (*backtrackStr == '\0'))
return false;

// Consume one more character for the wildcard.
pattern = backtrackPattern;
str = ++backtrackStr;
}
}

Expand Down