Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 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 #ifdef _MSC_VER |
| 35 #pragma warning(push) | |
| 36 #pragma warning(disable : 4351) | |
| 37 #endif // _MSC_VER | |
|
William Hesse
2011/02/05 19:38:12
Can't we disable the warning as a setting in the V
| |
| 38 LGapResolver::LGapResolver(LCodeGen* owner) | |
| 35 : cgen_(owner), | 39 : cgen_(owner), |
| 36 moves_(32), | 40 moves_(32), |
| 37 source_uses_(), | 41 source_uses_(), |
| 38 destination_uses_(), | 42 destination_uses_(), |
| 39 spilled_register_(-1) {} | 43 spilled_register_(-1) {} |
| 40 | 44 #ifdef _MSC_VER |
| 45 #pragma warning(pop) | |
| 46 #endif // _MSC_VER | |
| 41 | 47 |
| 42 void LGapResolver::Resolve(LParallelMove* parallel_move) { | 48 void LGapResolver::Resolve(LParallelMove* parallel_move) { |
| 43 ASSERT(HasBeenReset()); | 49 ASSERT(HasBeenReset()); |
| 44 // Build up a worklist of moves. | 50 // Build up a worklist of moves. |
| 45 BuildInitialMoveList(parallel_move); | 51 BuildInitialMoveList(parallel_move); |
| 46 | 52 |
| 47 for (int i = 0; i < moves_.length(); ++i) { | 53 for (int i = 0; i < moves_.length(); ++i) { |
| 48 LMoveOperands move = moves_[i]; | 54 LMoveOperands move = moves_[i]; |
| 49 // Skip constants to perform them last. They don't block other moves | 55 // Skip constants to perform them last. They don't block other moves |
| 50 // and skipping such moves with register destinations keeps those | 56 // and skipping such moves with register destinations keeps those |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 // Compute those counts now. | 457 // Compute those counts now. |
| 452 source_uses_[source->index()] = CountSourceUses(source); | 458 source_uses_[source->index()] = CountSourceUses(source); |
| 453 } else if (destination->IsRegister()) { | 459 } else if (destination->IsRegister()) { |
| 454 source_uses_[destination->index()] = CountSourceUses(destination); | 460 source_uses_[destination->index()] = CountSourceUses(destination); |
| 455 } | 461 } |
| 456 } | 462 } |
| 457 | 463 |
| 458 #undef __ | 464 #undef __ |
| 459 | 465 |
| 460 } } // namespace v8::internal | 466 } } // namespace v8::internal |
| OLD | NEW |