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

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

Issue 14284010: Introduce HObjectAccess, which is used by LoadNamedField and StoreNamedField to denote what parts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Some small cleanups; add AddLoad to simplify construction of loads Created 7 years, 7 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
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | 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 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after
3645 ASSERT(HasNoUses()); 3645 ASSERT(HasNoUses());
3646 } 3646 }
3647 3647
3648 3648
3649 void HCheckFunction::Verify() { 3649 void HCheckFunction::Verify() {
3650 HInstruction::Verify(); 3650 HInstruction::Verify();
3651 ASSERT(HasNoUses()); 3651 ASSERT(HasNoUses());
3652 } 3652 }
3653 3653
3654 #endif 3654 #endif
3655 3655
danno 2013/05/02 14:16:47 nit: 2 lines
titzer 2013/05/03 09:18:41 Done.
3656 void HObjectAccess::SetGVNFlags(HValue *instr, bool is_store) {
3657 // set the appropriate GVN flags for a given load or store instruction
3658 if (!is_store) {
danno 2013/05/02 14:16:47 Why not just switch the else and then blocks so it
titzer 2013/05/03 09:18:41 Done.
3659 instr->SetFlag(HValue::kUseGVN); // try to GVN loads
3660 instr->SetGVNFlag(kDependsOnMaps); // but don't hoist above map changes
3661 } else {
3662 // track dominating allocations in order to eliminate write barriers
3663 instr->SetGVNFlag(kDependsOnNewSpacePromotion);
3664 instr->SetFlag(HValue::kTrackSideEffectDominators);
3665 }
3666
3667 switch (portion_) {
3668 case kArrayLengths:
danno 2013/05/02 14:16:47 Weird indentation. Elsewhere in the code we use 2-
titzer 2013/05/03 09:18:41 Done.
3669 instr->SetGVNFlag(
3670 is_store ? kChangesArrayLengths : kDependsOnArrayLengths);
3671 break;
3672 case kInobject:
3673 instr->SetGVNFlag(
3674 is_store ? kChangesInobjectFields : kDependsOnInobjectFields);
3675 break;
3676 case kBackingStore:
3677 instr->SetGVNFlag(
3678 is_store ? kChangesBackingStoreFields : kDependsOnBackingStoreFields);
3679 break;
3680 case kElementsPointer:
3681 instr->SetGVNFlag(
3682 is_store ? kChangesElementsPointer : kDependsOnElementsPointer);
3683 break;
3684 case kMaps:
3685 instr->SetGVNFlag(
3686 is_store ? kChangesMaps : kDependsOnMaps);
3687 break;
3688 }
3689 }
3690
3656 } } // namespace v8::internal 3691 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698