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

Side by Side Diff: src/hydrogen.cc

Issue 10532063: Optimistically assume that elements IC only transition once. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 6 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/elements-kind.h ('k') | src/ic.h » ('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 5545 matching lines...) Expand 10 before | Expand all | Expand 10 after
5556 ASSERT(map->IsMap()); 5556 ASSERT(map->IsMap());
5557 if (!transition_target.at(i).is_null()) { 5557 if (!transition_target.at(i).is_null()) {
5558 ASSERT(Map::IsValidElementsTransition( 5558 ASSERT(Map::IsValidElementsTransition(
5559 map->elements_kind(), 5559 map->elements_kind(),
5560 transition_target.at(i)->elements_kind())); 5560 transition_target.at(i)->elements_kind()));
5561 transition = new(zone()) HTransitionElementsKind( 5561 transition = new(zone()) HTransitionElementsKind(
5562 object, map, transition_target.at(i)); 5562 object, map, transition_target.at(i));
5563 AddInstruction(transition); 5563 AddInstruction(transition);
5564 } else { 5564 } else {
5565 type_todo[map->elements_kind()] = true; 5565 type_todo[map->elements_kind()] = true;
5566 if (map->elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND) { 5566 if (IsExternalArrayElementsKind(map->elements_kind())) {
5567 todo_external_array = true; 5567 todo_external_array = true;
5568 } 5568 }
5569 num_untransitionable_maps++; 5569 num_untransitionable_maps++;
5570 untransitionable_map = map; 5570 untransitionable_map = map;
5571 } 5571 }
5572 } 5572 }
5573 5573
5574 // If only one map is left after transitioning, handle this case 5574 // If only one map is left after transitioning, handle this case
5575 // monomorphically. 5575 // monomorphically.
5576 if (num_untransitionable_maps == 1) { 5576 if (num_untransitionable_maps == 1) {
(...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after
9127 } 9127 }
9128 } 9128 }
9129 9129
9130 #ifdef DEBUG 9130 #ifdef DEBUG
9131 if (graph_ != NULL) graph_->Verify(false); // No full verify. 9131 if (graph_ != NULL) graph_->Verify(false); // No full verify.
9132 if (allocator_ != NULL) allocator_->Verify(); 9132 if (allocator_ != NULL) allocator_->Verify();
9133 #endif 9133 #endif
9134 } 9134 }
9135 9135
9136 } } // namespace v8::internal 9136 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698