OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 return instructions_[index]->IsGap(); | 453 return instructions_[index]->IsGap(); |
454 } | 454 } |
455 | 455 |
456 | 456 |
457 int LChunk::NearestGapPos(int index) const { | 457 int LChunk::NearestGapPos(int index) const { |
458 while (!IsGapAt(index)) index--; | 458 while (!IsGapAt(index)) index--; |
459 return index; | 459 return index; |
460 } | 460 } |
461 | 461 |
462 | 462 |
463 int LChunk::NearestNextGapPos(int index) const { | |
464 while (!IsGapAt(index)) index++; | |
465 return index; | |
466 } | |
467 | |
468 | |
469 void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) { | 463 void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) { |
470 GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to); | 464 GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to); |
471 } | 465 } |
472 | 466 |
473 | 467 |
474 class LGapNode: public ZoneObject { | 468 class LGapNode: public ZoneObject { |
475 public: | 469 public: |
476 explicit LGapNode(LOperand* operand) | 470 explicit LGapNode(LOperand* operand) |
477 : operand_(operand), resolved_(false), visited_id_(-1) { } | 471 : operand_(operand), resolved_(false), visited_id_(-1) { } |
478 | 472 |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2072 void LPointerMap::PrintTo(StringStream* stream) const { | 2066 void LPointerMap::PrintTo(StringStream* stream) const { |
2073 stream->Add("{"); | 2067 stream->Add("{"); |
2074 for (int i = 0; i < pointer_operands_.length(); ++i) { | 2068 for (int i = 0; i < pointer_operands_.length(); ++i) { |
2075 if (i != 0) stream->Add(";"); | 2069 if (i != 0) stream->Add(";"); |
2076 pointer_operands_[i]->PrintTo(stream); | 2070 pointer_operands_[i]->PrintTo(stream); |
2077 } | 2071 } |
2078 stream->Add("} @%d", position()); | 2072 stream->Add("} @%d", position()); |
2079 } | 2073 } |
2080 | 2074 |
2081 } } // namespace v8::internal | 2075 } } // namespace v8::internal |
OLD | NEW |