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

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

Issue 12035026: Allow removal of obsolete map checks after transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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') | no next file » | 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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 case IS_SYMBOL: 1155 case IS_SYMBOL:
1156 *mask = kIsSymbolMask; 1156 *mask = kIsSymbolMask;
1157 *tag = kSymbolTag; 1157 *tag = kSymbolTag;
1158 return; 1158 return;
1159 default: 1159 default:
1160 UNREACHABLE(); 1160 UNREACHABLE();
1161 } 1161 }
1162 } 1162 }
1163 1163
1164 1164
1165 void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect,
1166 HValue* dominator) {
1167 ASSERT(side_effect == kChangesMaps);
1168 // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
1169 // type information is rich enough we should generalize this to any HType
1170 // for which the map is known.
1171 if (dominator->IsStoreNamedField()) {
1172 HStoreNamedField* store = HStoreNamedField::cast(dominator);
1173 Handle<Map> map = store->transition();
1174 if (map.is_null() || store->object() != value()) return;
1175 for (int i = 0; i < map_set()->length(); i++) {
1176 if (map.is_identical_to(map_set()->at(i))) {
1177 DeleteAndReplaceWith(NULL);
1178 return;
1179 }
1180 }
1181 }
1182 }
1183
1184
1165 void HLoadElements::PrintDataTo(StringStream* stream) { 1185 void HLoadElements::PrintDataTo(StringStream* stream) {
1166 value()->PrintNameTo(stream); 1186 value()->PrintNameTo(stream);
1167 if (HasTypeCheck()) { 1187 if (HasTypeCheck()) {
1168 stream->Add(" "); 1188 stream->Add(" ");
1169 typecheck()->PrintNameTo(stream); 1189 typecheck()->PrintNameTo(stream);
1170 } 1190 }
1171 } 1191 }
1172 1192
1173 1193
1174 void HCheckMaps::PrintDataTo(StringStream* stream) { 1194 void HCheckMaps::PrintDataTo(StringStream* stream) {
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 2825
2806 2826
2807 void HCheckFunction::Verify() { 2827 void HCheckFunction::Verify() {
2808 HInstruction::Verify(); 2828 HInstruction::Verify();
2809 ASSERT(HasNoUses()); 2829 ASSERT(HasNoUses());
2810 } 2830 }
2811 2831
2812 #endif 2832 #endif
2813 2833
2814 } } // namespace v8::internal 2834 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698