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

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

Issue 18998003: Revert "Calls to HCheckFunction can be eliminated if the value is an HConstant" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/objects.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 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
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
1701 const char* HCheckInstanceType::GetCheckName() { 1693 const char* HCheckInstanceType::GetCheckName() {
1702 switch (check_) { 1694 switch (check_) {
1703 case IS_SPEC_OBJECT: return "object"; 1695 case IS_SPEC_OBJECT: return "object";
1704 case IS_JS_ARRAY: return "array"; 1696 case IS_JS_ARRAY: return "array";
1705 case IS_STRING: return "string"; 1697 case IS_STRING: return "string";
1706 case IS_INTERNALIZED_STRING: return "internalized_string"; 1698 case IS_INTERNALIZED_STRING: return "internalized_string";
1707 } 1699 }
1708 UNREACHABLE(); 1700 UNREACHABLE();
1709 return ""; 1701 return "";
1710 } 1702 }
(...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3915 case kBackingStore: 3907 case kBackingStore:
3916 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 3908 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3917 stream->Add("[backing-store]"); 3909 stream->Add("[backing-store]");
3918 break; 3910 break;
3919 } 3911 }
3920 3912
3921 stream->Add("@%d", offset()); 3913 stream->Add("@%d", offset());
3922 } 3914 }
3923 3915
3924 } } // namespace v8::internal 3916 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698