OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 14 matching lines...) Expand all Loading... | |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "ia32/lithium-gap-resolver-ia32.h" | 28 #include "ia32/lithium-gap-resolver-ia32.h" |
29 #include "ia32/lithium-codegen-ia32.h" | 29 #include "ia32/lithium-codegen-ia32.h" |
30 | 30 |
31 namespace v8 { | 31 namespace v8 { |
32 namespace internal { | 32 namespace internal { |
33 | 33 |
34 LGapResolver::LGapResolver(LCodeGen* owner) | 34 LGapResolver::LGapResolver(LCodeGen* owner) |
35 : cgen_(owner), moves_(32), spilled_register_(-1) { | 35 : cgen_(owner), moves_(32), source_uses_(), destination_uses_(), |
Kevin Millikin (Chromium)
2011/01/24 14:57:12
I prefer treating the initializers like arguments
William Hesse
2011/01/26 10:05:57
Done.
| |
36 for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) { | 36 spilled_register_(-1) {} |
37 source_uses_[i] = 0; | |
38 destination_uses_[i] = 0; | |
39 } | |
40 } | |
41 | 37 |
42 | 38 |
43 void LGapResolver::Resolve(LParallelMove* parallel_move) { | 39 void LGapResolver::Resolve(LParallelMove* parallel_move) { |
44 ASSERT(HasBeenReset()); | 40 ASSERT(HasBeenReset()); |
45 // Build up a worklist of moves. | 41 // Build up a worklist of moves. |
46 BuildInitialMoveList(parallel_move); | 42 BuildInitialMoveList(parallel_move); |
47 | 43 |
48 for (int i = 0; i < moves_.length(); ++i) { | 44 for (int i = 0; i < moves_.length(); ++i) { |
49 LMoveOperands move = moves_[i]; | 45 LMoveOperands move = moves_[i]; |
50 // Skip constants to perform them last. They don't block other moves | 46 // Skip constants to perform them last. They don't block other moves |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 // Compute those counts now. | 448 // Compute those counts now. |
453 source_uses_[source->index()] = CountSourceUses(source); | 449 source_uses_[source->index()] = CountSourceUses(source); |
454 } else if (destination->IsRegister()) { | 450 } else if (destination->IsRegister()) { |
455 source_uses_[destination->index()] = CountSourceUses(destination); | 451 source_uses_[destination->index()] = CountSourceUses(destination); |
456 } | 452 } |
457 } | 453 } |
458 | 454 |
459 #undef __ | 455 #undef __ |
460 | 456 |
461 } } // namespace v8::internal | 457 } } // namespace v8::internal |
OLD | NEW |