| Index: runtime/vm/locations.cc
|
| diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc
|
| index fb19c1f2d45430d697abed284276ab195f6c1d96..265b198ff776454f23f39b9eea3c17dfe748f7db 100644
|
| --- a/runtime/vm/locations.cc
|
| +++ b/runtime/vm/locations.cc
|
| @@ -12,6 +12,17 @@
|
|
|
| namespace dart {
|
|
|
| +intptr_t RegisterSet::RegisterCount(intptr_t registers) {
|
| + // Brian Kernighan's algorithm for counting the bits set.
|
| + intptr_t count = 0;
|
| + while (registers != 0) {
|
| + ++count;
|
| + registers &= (registers - 1); // Clear the least significant bit set.
|
| + }
|
| + return count;
|
| +}
|
| +
|
| +
|
| LocationSummary::LocationSummary(intptr_t input_count,
|
| intptr_t temp_count,
|
| LocationSummary::ContainsCall contains_call)
|
|
|