mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
Randomize insertion
This commit is contained in:
parent
38569db44e
commit
f45e368e52
@ -1059,6 +1059,13 @@ public:
|
||||
// Record this CallGenerator for inlining at the end of parsing.
|
||||
void add_late_inline(CallGenerator* cg) {
|
||||
_late_inlines.insert_before(_late_inlines_pos, cg);
|
||||
if (StressIncrementalInlining) {
|
||||
assert(_late_inlines_pos < _late_inlines.length(), "unthinkable!");
|
||||
if (_late_inlines.length() - _late_inlines_pos >= 2) {
|
||||
int j = (C->random() % (_late_inlines.length() - _late_inlines_pos)) + _late_inlines_pos;
|
||||
swap(_late_inlines.at(_late_inlines_pos), _late_inlines.at(j));
|
||||
}
|
||||
}
|
||||
_late_inlines_pos++;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user