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

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

Issue 301973014: Folding of bounded dynamic size allocations with const size allocations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 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 | « no previous file | src/hydrogen-instructions.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 5558 matching lines...) Expand 10 before | Expand all | Expand 10 after
5569 } 5569 }
5570 return flags; 5570 return flags;
5571 } 5571 }
5572 5572
5573 void UpdateClearNextMapWord(bool clear_next_map_word) { 5573 void UpdateClearNextMapWord(bool clear_next_map_word) {
5574 flags_ = static_cast<Flags>(clear_next_map_word 5574 flags_ = static_cast<Flags>(clear_next_map_word
5575 ? flags_ | CLEAR_NEXT_MAP_WORD 5575 ? flags_ | CLEAR_NEXT_MAP_WORD
5576 : flags_ & ~CLEAR_NEXT_MAP_WORD); 5576 : flags_ & ~CLEAR_NEXT_MAP_WORD);
5577 } 5577 }
5578 5578
5579 void UpdateSize(HValue* size) { 5579 void UpdateSize(HValue* size, HConstant* size_upper_bound = NULL) {
5580 SetOperandAt(1, size); 5580 SetOperandAt(1, size);
5581 if (size->IsInteger32Constant()) { 5581 if (size->IsInteger32Constant()) {
5582 size_upper_bound_ = HConstant::cast(size); 5582 size_upper_bound_ = HConstant::cast(size);
5583 } else { 5583 } else {
5584 size_upper_bound_ = NULL; 5584 size_upper_bound_ = size_upper_bound;
5585 } 5585 }
5586 } 5586 }
5587 5587
5588 HAllocate* GetFoldableDominator(HAllocate* dominator); 5588 HAllocate* GetFoldableDominator(HAllocate* dominator);
5589 5589
5590 void UpdateFreeSpaceFiller(int32_t filler_size); 5590 void UpdateFreeSpaceFiller(int32_t filler_size);
5591 5591
5592 void CreateFreeSpaceFiller(int32_t filler_size); 5592 void CreateFreeSpaceFiller(int32_t filler_size);
5593 5593
5594 bool IsFoldable(HAllocate* allocate) { 5594 bool IsFoldable(HAllocate* allocate) {
5595 return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) || 5595 return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) ||
5596 (IsOldDataSpaceAllocation() && allocate->IsOldDataSpaceAllocation()) || 5596 (IsOldDataSpaceAllocation() && allocate->IsOldDataSpaceAllocation()) ||
5597 (IsOldPointerSpaceAllocation() && 5597 (IsOldPointerSpaceAllocation() &&
5598 allocate->IsOldPointerSpaceAllocation()); 5598 allocate->IsOldPointerSpaceAllocation());
5599 } 5599 }
5600 5600
5601 void ClearNextMapWord(int offset); 5601 void ClearNextMapWord(HValue* offset);
5602 5602
5603 Flags flags_; 5603 Flags flags_;
5604 Handle<Map> known_initial_map_; 5604 Handle<Map> known_initial_map_;
5605 HAllocate* dominating_allocate_; 5605 HAllocate* dominating_allocate_;
5606 HStoreNamedField* filler_free_space_size_; 5606 HStoreNamedField* filler_free_space_size_;
5607 HConstant* size_upper_bound_; 5607 HConstant* size_upper_bound_;
5608 }; 5608 };
5609 5609
5610 5610
5611 class HStoreCodeEntry V8_FINAL: public HTemplateInstruction<2> { 5611 class HStoreCodeEntry V8_FINAL: public HTemplateInstruction<2> {
(...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after
7729 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7729 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7730 }; 7730 };
7731 7731
7732 7732
7733 #undef DECLARE_INSTRUCTION 7733 #undef DECLARE_INSTRUCTION
7734 #undef DECLARE_CONCRETE_INSTRUCTION 7734 #undef DECLARE_CONCRETE_INSTRUCTION
7735 7735
7736 } } // namespace v8::internal 7736 } } // namespace v8::internal
7737 7737
7738 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7738 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698