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.cc

Issue 9365057: Relax TransitionElementsKind DependsOn/Changes dependencies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ensure that MapChecks before and after transitions are recognized as dupes Created 8 years, 10 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
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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 // Keep it. 1185 // Keep it.
1186 lists_[current].next = kept; 1186 lists_[current].next = kept;
1187 kept = current; 1187 kept = current;
1188 present_flags_.Add(value->gvn_flags()); 1188 present_flags_.Add(value->gvn_flags());
1189 } 1189 }
1190 } 1190 }
1191 array_[i].next = kept; 1191 array_[i].next = kept;
1192 1192
1193 // Now possibly drop directly indexed element. 1193 // Now possibly drop directly indexed element.
1194 value = array_[i].value; 1194 value = array_[i].value;
1195 if (value->gvn_flags().ContainsAnyOf(depends_flags)) { // Drop it. 1195 if (value->gvn_flags().ContainsAnyOf(depends_flags) &&
1196 !value->IsTransitionElementsKind()) { // Drop it.
fschneider 2012/02/15 15:36:48 I don't understand why skipping transition instruc
danno 2012/02/16 13:08:52 Done.
1196 count_--; 1197 count_--;
1197 int head = array_[i].next; 1198 int head = array_[i].next;
1198 if (head == kNil) { 1199 if (head == kNil) {
1199 array_[i].value = NULL; 1200 array_[i].value = NULL;
1200 } else { 1201 } else {
1201 array_[i].value = lists_[head].value; 1202 array_[i].value = lists_[head].value;
1202 array_[i].next = lists_[head].next; 1203 array_[i].next = lists_[head].next;
1203 lists_[head].next = free_list_head_; 1204 lists_[head].next = free_list_head_;
1204 free_list_head_ = head; 1205 free_list_head_ = head;
1205 } 1206 }
(...skipping 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
4447 map->FindTransitionedMap(&possible_transitioned_maps); 4448 map->FindTransitionedMap(&possible_transitioned_maps);
4448 transition_target.Add(transitioned_map); 4449 transition_target.Add(transitioned_map);
4449 } 4450 }
4450 4451
4451 int num_untransitionable_maps = 0; 4452 int num_untransitionable_maps = 0;
4452 Handle<Map> untransitionable_map; 4453 Handle<Map> untransitionable_map;
4453 for (int i = 0; i < maps->length(); ++i) { 4454 for (int i = 0; i < maps->length(); ++i) {
4454 Handle<Map> map = maps->at(i); 4455 Handle<Map> map = maps->at(i);
4455 ASSERT(map->IsMap()); 4456 ASSERT(map->IsMap());
4456 if (!transition_target.at(i).is_null()) { 4457 if (!transition_target.at(i).is_null()) {
4457 object = AddInstruction(new(zone()) HTransitionElementsKind( 4458 AddInstruction(new(zone()) HTransitionElementsKind(
4458 object, map, transition_target.at(i))); 4459 object, map, transition_target.at(i)));
4459 } else { 4460 } else {
4460 type_todo[map->elements_kind()] = true; 4461 type_todo[map->elements_kind()] = true;
4461 if (map->elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND) { 4462 if (map->elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND) {
4462 todo_external_array = true; 4463 todo_external_array = true;
4463 } 4464 }
4464 num_untransitionable_maps++; 4465 num_untransitionable_maps++;
4465 untransitionable_map = map; 4466 untransitionable_map = map;
4466 } 4467 }
4467 } 4468 }
(...skipping 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after
7707 } 7708 }
7708 } 7709 }
7709 7710
7710 #ifdef DEBUG 7711 #ifdef DEBUG
7711 if (graph_ != NULL) graph_->Verify(false); // No full verify. 7712 if (graph_ != NULL) graph_->Verify(false); // No full verify.
7712 if (allocator_ != NULL) allocator_->Verify(); 7713 if (allocator_ != NULL) allocator_->Verify();
7713 #endif 7714 #endif
7714 } 7715 }
7715 7716
7716 } } // namespace v8::internal 7717 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698