OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |