Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1608 : new(zone) Range(); | 1608 : new(zone) Range(); |
| 1609 result->Shl(c->Integer32Value()); | 1609 result->Shl(c->Integer32Value()); |
| 1610 result->set_can_be_minus_zero(false); | 1610 result->set_can_be_minus_zero(false); |
| 1611 return result; | 1611 return result; |
| 1612 } | 1612 } |
| 1613 } | 1613 } |
| 1614 return HValue::InferRange(zone); | 1614 return HValue::InferRange(zone); |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 | 1617 |
| 1618 Range* HRor::InferRange(Zone* zone) { | |
| 1619 if (right()->IsConstant()) { | |
| 1620 HConstant* c = HConstant::cast(right()); | |
| 1621 if (c->HasInteger32Value()) { | |
| 1622 Range* result = (left()->range() != NULL) | |
| 1623 ? left()->range()->Copy(zone) | |
| 1624 : new(zone) Range(); | |
|
Erik Corry
2012/09/27 14:45:44
Don't you have to Ror the result here?
| |
| 1625 return result; | |
| 1626 } | |
| 1627 } | |
| 1628 return HValue::InferRange(zone); | |
| 1629 } | |
| 1630 | |
| 1631 | |
| 1618 Range* HLoadKeyedSpecializedArrayElement::InferRange(Zone* zone) { | 1632 Range* HLoadKeyedSpecializedArrayElement::InferRange(Zone* zone) { |
| 1619 switch (elements_kind()) { | 1633 switch (elements_kind()) { |
| 1620 case EXTERNAL_PIXEL_ELEMENTS: | 1634 case EXTERNAL_PIXEL_ELEMENTS: |
| 1621 return new(zone) Range(0, 255); | 1635 return new(zone) Range(0, 255); |
| 1622 case EXTERNAL_BYTE_ELEMENTS: | 1636 case EXTERNAL_BYTE_ELEMENTS: |
| 1623 return new(zone) Range(-128, 127); | 1637 return new(zone) Range(-128, 127); |
| 1624 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 1638 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 1625 return new(zone) Range(0, 255); | 1639 return new(zone) Range(0, 255); |
| 1626 case EXTERNAL_SHORT_ELEMENTS: | 1640 case EXTERNAL_SHORT_ELEMENTS: |
| 1627 return new(zone) Range(-32768, 32767); | 1641 return new(zone) Range(-32768, 32767); |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2627 | 2641 |
| 2628 | 2642 |
| 2629 void HCheckPrototypeMaps::Verify() { | 2643 void HCheckPrototypeMaps::Verify() { |
| 2630 HInstruction::Verify(); | 2644 HInstruction::Verify(); |
| 2631 ASSERT(HasNoUses()); | 2645 ASSERT(HasNoUses()); |
| 2632 } | 2646 } |
| 2633 | 2647 |
| 2634 #endif | 2648 #endif |
| 2635 | 2649 |
| 2636 } } // namespace v8::internal | 2650 } } // namespace v8::internal |
| OLD | NEW |