Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 7043003: Version 3.3.8 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 #define MAKE_CASE(type) case k##type: return #type; 359 #define MAKE_CASE(type) case k##type: return #type;
360 HYDROGEN_CONCRETE_INSTRUCTION_LIST(MAKE_CASE) 360 HYDROGEN_CONCRETE_INSTRUCTION_LIST(MAKE_CASE)
361 #undef MAKE_CASE 361 #undef MAKE_CASE
362 case kPhi: return "Phi"; 362 case kPhi: return "Phi";
363 default: return ""; 363 default: return "";
364 } 364 }
365 } 365 }
366 366
367 367
368 void HValue::SetOperandAt(int index, HValue* value) { 368 void HValue::SetOperandAt(int index, HValue* value) {
369 ASSERT(value == NULL || !value->representation().IsNone());
370 RegisterUse(index, value); 369 RegisterUse(index, value);
371 InternalSetOperandAt(index, value); 370 InternalSetOperandAt(index, value);
372 } 371 }
373 372
374 373
375 void HValue::DeleteAndReplaceWith(HValue* other) { 374 void HValue::DeleteAndReplaceWith(HValue* other) {
376 // We replace all uses first, so Delete can assert that there are none. 375 // We replace all uses first, so Delete can assert that there are none.
377 if (other != NULL) ReplaceAllUsesWith(other); 376 if (other != NULL) ReplaceAllUsesWith(other);
378 ASSERT(HasNoUses()); 377 ASSERT(HasNoUses());
379 ClearOperands(); 378 ClearOperands();
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 HInstruction* cur = cur_block->first(); 592 HInstruction* cur = cur_block->first();
594 while (cur != NULL) { 593 while (cur != NULL) {
595 ASSERT(cur != this); // We should reach other_operand before! 594 ASSERT(cur != this); // We should reach other_operand before!
596 if (cur == other_operand) break; 595 if (cur == other_operand) break;
597 cur = cur->next(); 596 cur = cur->next();
598 } 597 }
599 // Must reach other operand in the same block! 598 // Must reach other operand in the same block!
600 ASSERT(cur == other_operand); 599 ASSERT(cur == other_operand);
601 } 600 }
602 } else { 601 } else {
602 // If the following assert fires, you may have forgotten an
603 // AddInstruction.
603 ASSERT(other_block->Dominates(cur_block)); 604 ASSERT(other_block->Dominates(cur_block));
604 } 605 }
605 } 606 }
606 607
607 // Verify that instructions that may have side-effects are followed 608 // Verify that instructions that may have side-effects are followed
608 // by a simulate instruction. 609 // by a simulate instruction.
609 if (HasSideEffects() && !IsOsrEntry()) { 610 if (HasSideEffects() && !IsOsrEntry()) {
610 ASSERT(next()->IsSimulate()); 611 ASSERT(next()->IsSimulate());
611 } 612 }
612 613
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 if (from().IsInteger32()) return NULL; 1631 if (from().IsInteger32()) return NULL;
1631 if (CanTruncateToInt32()) return NULL; 1632 if (CanTruncateToInt32()) return NULL;
1632 if (value()->range() == NULL || value()->range()->CanBeMinusZero()) { 1633 if (value()->range() == NULL || value()->range()->CanBeMinusZero()) {
1633 SetFlag(kBailoutOnMinusZero); 1634 SetFlag(kBailoutOnMinusZero);
1634 } 1635 }
1635 ASSERT(!from().IsInteger32() || !to().IsInteger32()); 1636 ASSERT(!from().IsInteger32() || !to().IsInteger32());
1636 return NULL; 1637 return NULL;
1637 } 1638 }
1638 1639
1639 1640
1641 HValue* HForceRepresentation::EnsureAndPropagateNotMinusZero(
1642 BitVector* visited) {
1643 visited->Add(id());
1644 return value();
1645 }
1646
1647
1640 HValue* HMod::EnsureAndPropagateNotMinusZero(BitVector* visited) { 1648 HValue* HMod::EnsureAndPropagateNotMinusZero(BitVector* visited) {
1641 visited->Add(id()); 1649 visited->Add(id());
1642 if (range() == NULL || range()->CanBeMinusZero()) { 1650 if (range() == NULL || range()->CanBeMinusZero()) {
1643 SetFlag(kBailoutOnMinusZero); 1651 SetFlag(kBailoutOnMinusZero);
1644 return left(); 1652 return left();
1645 } 1653 }
1646 return NULL; 1654 return NULL;
1647 } 1655 }
1648 1656
1649 1657
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 1760
1753 1761
1754 void HCheckPrototypeMaps::Verify() { 1762 void HCheckPrototypeMaps::Verify() {
1755 HInstruction::Verify(); 1763 HInstruction::Verify();
1756 ASSERT(HasNoUses()); 1764 ASSERT(HasNoUses());
1757 } 1765 }
1758 1766
1759 #endif 1767 #endif
1760 1768
1761 } } // namespace v8::internal 1769 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698