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 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 stream->Add("]"); | 1683 stream->Add("]"); |
1684 } | 1684 } |
1685 | 1685 |
1686 | 1686 |
1687 void HCheckFunction::PrintDataTo(StringStream* stream) { | 1687 void HCheckFunction::PrintDataTo(StringStream* stream) { |
1688 value()->PrintNameTo(stream); | 1688 value()->PrintNameTo(stream); |
1689 stream->Add(" %p", *target()); | 1689 stream->Add(" %p", *target()); |
1690 } | 1690 } |
1691 | 1691 |
1692 | 1692 |
| 1693 HValue* HCheckFunction::Canonicalize() { |
| 1694 return (value()->IsConstant() && |
| 1695 HConstant::cast(value())->UniqueValueIdsMatch(target_unique_id_)) |
| 1696 ? NULL |
| 1697 : this; |
| 1698 } |
| 1699 |
| 1700 |
1693 const char* HCheckInstanceType::GetCheckName() { | 1701 const char* HCheckInstanceType::GetCheckName() { |
1694 switch (check_) { | 1702 switch (check_) { |
1695 case IS_SPEC_OBJECT: return "object"; | 1703 case IS_SPEC_OBJECT: return "object"; |
1696 case IS_JS_ARRAY: return "array"; | 1704 case IS_JS_ARRAY: return "array"; |
1697 case IS_STRING: return "string"; | 1705 case IS_STRING: return "string"; |
1698 case IS_INTERNALIZED_STRING: return "internalized_string"; | 1706 case IS_INTERNALIZED_STRING: return "internalized_string"; |
1699 } | 1707 } |
1700 UNREACHABLE(); | 1708 UNREACHABLE(); |
1701 return ""; | 1709 return ""; |
1702 } | 1710 } |
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3980 case kBackingStore: | 3988 case kBackingStore: |
3981 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 3989 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); |
3982 stream->Add("[backing-store]"); | 3990 stream->Add("[backing-store]"); |
3983 break; | 3991 break; |
3984 } | 3992 } |
3985 | 3993 |
3986 stream->Add("@%d", offset()); | 3994 stream->Add("@%d", offset()); |
3987 } | 3995 } |
3988 | 3996 |
3989 } } // namespace v8::internal | 3997 } } // namespace v8::internal |
OLD | NEW |