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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index fc6c3c599a80b06e004d0ec60aff0212f005d587..9df554c2a1db5630267a960e04a0d4f8b15dfe6e 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1162,6 +1162,26 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) {
}
+void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect,
+ HValue* dominator) {
+ ASSERT(side_effect == kChangesMaps);
+ // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
+ // type information is rich enough we should generalize this to any HType
+ // for which the map is known.
+ if (dominator->IsStoreNamedField()) {
+ HStoreNamedField* store = HStoreNamedField::cast(dominator);
+ Handle<Map> map = store->transition();
+ if (map.is_null() || store->object() != value()) return;
+ for (int i = 0; i < map_set()->length(); i++) {
+ if (map.is_identical_to(map_set()->at(i))) {
+ DeleteAndReplaceWith(NULL);
+ return;
+ }
+ }
+ }
+}
+
+
void HLoadElements::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
if (HasTypeCheck()) {
« 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