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

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

Issue 10972011: Allow optimistically hoisting elements transitions over accesses. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 2 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.cc ('k') | test/mjsunit/elements-transition-hoisting.js » ('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 4643 matching lines...) Expand 10 before | Expand all | Expand 10 after
4654 4654
4655 class HTransitionElementsKind: public HTemplateInstruction<1> { 4655 class HTransitionElementsKind: public HTemplateInstruction<1> {
4656 public: 4656 public:
4657 HTransitionElementsKind(HValue* object, 4657 HTransitionElementsKind(HValue* object,
4658 Handle<Map> original_map, 4658 Handle<Map> original_map,
4659 Handle<Map> transitioned_map) 4659 Handle<Map> transitioned_map)
4660 : original_map_(original_map), 4660 : original_map_(original_map),
4661 transitioned_map_(transitioned_map) { 4661 transitioned_map_(transitioned_map) {
4662 SetOperandAt(0, object); 4662 SetOperandAt(0, object);
4663 SetFlag(kUseGVN); 4663 SetFlag(kUseGVN);
4664 // Don't set GVN DependOn flags here. That would defeat GVN's detection of
4665 // congruent HTransitionElementsKind instructions. Instruction hoisting
4666 // handles HTransitionElementsKind instruction specially, explicitly adding
4667 // DependsOn flags during its dependency calculations.
4668 SetGVNFlag(kChangesElementsKind); 4664 SetGVNFlag(kChangesElementsKind);
4669 if (original_map->has_fast_double_elements()) { 4665 if (original_map->has_fast_double_elements()) {
4670 SetGVNFlag(kChangesElementsPointer); 4666 SetGVNFlag(kChangesElementsPointer);
4671 SetGVNFlag(kChangesNewSpacePromotion); 4667 SetGVNFlag(kChangesNewSpacePromotion);
4672 } 4668 }
4673 if (transitioned_map->has_fast_double_elements()) { 4669 if (transitioned_map->has_fast_double_elements()) {
4674 SetGVNFlag(kChangesElementsPointer); 4670 SetGVNFlag(kChangesElementsPointer);
4675 SetGVNFlag(kChangesNewSpacePromotion); 4671 SetGVNFlag(kChangesNewSpacePromotion);
4676 } 4672 }
4677 set_representation(Representation::Tagged()); 4673 set_representation(Representation::Tagged());
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
5282 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 5278 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
5283 }; 5279 };
5284 5280
5285 5281
5286 #undef DECLARE_INSTRUCTION 5282 #undef DECLARE_INSTRUCTION
5287 #undef DECLARE_CONCRETE_INSTRUCTION 5283 #undef DECLARE_CONCRETE_INSTRUCTION
5288 5284
5289 } } // namespace v8::internal 5285 } } // namespace v8::internal
5290 5286
5291 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5287 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/elements-transition-hoisting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698