OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/locations.h" | 5 #include "vm/locations.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/il_printer.h" | 8 #include "vm/il_printer.h" |
9 #include "vm/intermediate_language.h" | |
10 #include "vm/flow_graph_compiler.h" | |
11 #include "vm/log.h" | 9 #include "vm/log.h" |
12 #include "vm/stack_frame.h" | 10 #include "vm/stack_frame.h" |
13 | 11 |
14 namespace dart { | 12 namespace dart { |
15 | 13 |
16 intptr_t RegisterSet::RegisterCount(intptr_t registers) { | 14 intptr_t RegisterSet::RegisterCount(intptr_t registers) { |
17 // Brian Kernighan's algorithm for counting the bits set. | 15 // Brian Kernighan's algorithm for counting the bits set. |
18 intptr_t count = 0; | 16 intptr_t count = 0; |
19 while (registers != 0) { | 17 while (registers != 0) { |
20 ++count; | 18 ++count; |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 // with the right representation because register allocator does not know | 347 // with the right representation because register allocator does not know |
350 // how they are used within the instruction template. | 348 // how they are used within the instruction template. |
351 ASSERT(in(i).IsMachineRegister()); | 349 ASSERT(in(i).IsMachineRegister()); |
352 ASSERT(live_registers()->Contains(in(i))); | 350 ASSERT(live_registers()->Contains(in(i))); |
353 } | 351 } |
354 } | 352 } |
355 } | 353 } |
356 #endif | 354 #endif |
357 | 355 |
358 } // namespace dart | 356 } // namespace dart |
OLD | NEW |