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 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 // Return NULL to remove this instruction from the graph. | 1626 // Return NULL to remove this instruction from the graph. |
1627 return NULL; | 1627 return NULL; |
1628 } | 1628 } |
1629 } | 1629 } |
1630 return this; | 1630 return this; |
1631 } | 1631 } |
1632 | 1632 |
1633 | 1633 |
1634 HValue* HCheckInstanceType::Canonicalize() { | 1634 HValue* HCheckInstanceType::Canonicalize() { |
1635 if (check_ == IS_STRING && value()->type().IsString()) { | 1635 if (check_ == IS_STRING && value()->type().IsString()) { |
1636 return NULL; | 1636 return value(); |
1637 } | 1637 } |
1638 | 1638 |
1639 if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) { | 1639 if (check_ == IS_INTERNALIZED_STRING && value()->IsConstant()) { |
1640 if (HConstant::cast(value())->HasInternalizedStringValue()) return NULL; | 1640 if (HConstant::cast(value())->HasInternalizedStringValue()) { |
| 1641 return value(); |
| 1642 } |
1641 } | 1643 } |
1642 return this; | 1644 return this; |
1643 } | 1645 } |
1644 | 1646 |
1645 | 1647 |
1646 void HCheckInstanceType::GetCheckInterval(InstanceType* first, | 1648 void HCheckInstanceType::GetCheckInterval(InstanceType* first, |
1647 InstanceType* last) { | 1649 InstanceType* last) { |
1648 ASSERT(is_interval_check()); | 1650 ASSERT(is_interval_check()); |
1649 switch (check_) { | 1651 switch (check_) { |
1650 case IS_SPEC_OBJECT: | 1652 case IS_SPEC_OBJECT: |
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4469 break; | 4471 break; |
4470 case kExternalMemory: | 4472 case kExternalMemory: |
4471 stream->Add("[external-memory]"); | 4473 stream->Add("[external-memory]"); |
4472 break; | 4474 break; |
4473 } | 4475 } |
4474 | 4476 |
4475 stream->Add("@%d", offset()); | 4477 stream->Add("@%d", offset()); |
4476 } | 4478 } |
4477 | 4479 |
4478 } } // namespace v8::internal | 4480 } } // namespace v8::internal |
OLD | NEW |