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

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

Issue 12033073: Fix map check removal issue in r13488. (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 | « no previous file | 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1166 }
1167 } 1167 }
1168 1168
1169 1169
1170 void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect, 1170 void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect,
1171 HValue* dominator) { 1171 HValue* dominator) {
1172 ASSERT(side_effect == kChangesMaps); 1172 ASSERT(side_effect == kChangesMaps);
1173 // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once 1173 // TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
1174 // type information is rich enough we should generalize this to any HType 1174 // type information is rich enough we should generalize this to any HType
1175 // for which the map is known. 1175 // for which the map is known.
1176 if (dominator->IsStoreNamedField()) { 1176 if (HasNoUses() && dominator->IsStoreNamedField()) {
1177 HStoreNamedField* store = HStoreNamedField::cast(dominator); 1177 HStoreNamedField* store = HStoreNamedField::cast(dominator);
1178 Handle<Map> map = store->transition(); 1178 Handle<Map> map = store->transition();
1179 if (map.is_null() || store->object() != value()) return; 1179 if (map.is_null() || store->object() != value()) return;
1180 for (int i = 0; i < map_set()->length(); i++) { 1180 for (int i = 0; i < map_set()->length(); i++) {
1181 if (map.is_identical_to(map_set()->at(i))) { 1181 if (map.is_identical_to(map_set()->at(i))) {
1182 DeleteAndReplaceWith(NULL); 1182 DeleteAndReplaceWith(NULL);
1183 return; 1183 return;
1184 } 1184 }
1185 } 1185 }
1186 } 1186 }
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
2834 2834
2835 2835
2836 void HCheckFunction::Verify() { 2836 void HCheckFunction::Verify() {
2837 HInstruction::Verify(); 2837 HInstruction::Verify();
2838 ASSERT(HasNoUses()); 2838 ASSERT(HasNoUses());
2839 } 2839 }
2840 2840
2841 #endif 2841 #endif
2842 2842
2843 } } // namespace v8::internal 2843 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698