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

Unified Diff: src/hydrogen-instructions.h

Issue 22378003: Added allocation folding support for old space allocations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | src/hydrogen-instructions.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 17222d40419575db3188bbc0aa37db7cb8ebb494..8c6c3d5314bc4b8e1ad1bbfe5b616a8a518845de 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3205,6 +3205,7 @@ class HConstant: public HTemplateInstruction<0> {
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double);
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>);
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference);
+ DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Object>, UniqueValueId);
Handle<Object> handle() {
if (handle_.is_null()) {
@@ -3397,12 +3398,12 @@ class HConstant: public HTemplateInstruction<0> {
Handle<Object> optional_handle = Handle<Object>::null());
HConstant(Handle<Object> handle,
UniqueValueId unique_id,
- Representation r,
- HType type,
- bool is_internalized_string,
- bool is_not_in_new_space,
- bool is_cell,
- bool boolean_value);
+ Representation r = Representation::Tagged(),
+ HType type = HType::Tagged(),
+ bool is_internalized_string = false,
+ bool is_not_in_new_space = true,
+ bool is_cell = false,
+ bool boolean_value = false);
explicit HConstant(ExternalReference reference);
void Initialize(Representation r);
@@ -5040,6 +5041,29 @@ class HAllocate: public HTemplateInstruction<2> {
SetOperandAt(1, size);
}
+ bool IsFoldable(HAllocate* allocate) {
+ return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) ||
+ (IsOldDataSpaceAllocation() && allocate->IsOldDataSpaceAllocation()) ||
+ (IsOldPointerSpaceAllocation() &&
+ allocate->IsOldPointerSpaceAllocation());
+ }
+
+ HAllocate* dominating_allocate() const {
+ return dominating_allocate_;
+ }
+
+ void set_dominating_allocate(HAllocate* allocate) {
titzer 2013/08/06 12:24:12 Don't add setters for fields that should not be mo
Hannes Payer (out of office) 2013/08/07 07:48:01 I made all setters and getters used just by HAlloc
+ dominating_allocate_ = allocate;
+ }
+
+ HConstant* filler_free_space_size() const {
+ return filler_free_space_size_;
+ }
+
+ void set_filler_free_space_size(HConstant* filler_free_space_size) {
+ filler_free_space_size_ = filler_free_space_size;
+ }
+
virtual void HandleSideEffectDominator(GVNFlag side_effect,
HValue* dominator);
@@ -5061,7 +5085,9 @@ class HAllocate: public HTemplateInstruction<2> {
HType type,
PretenureFlag pretenure_flag,
InstanceType instance_type)
- : HTemplateInstruction<2>(type) {
+ : HTemplateInstruction<2>(type),
+ dominating_allocate_(NULL),
+ filler_free_space_size_(NULL) {
SetOperandAt(0, context);
SetOperandAt(1, size);
set_representation(Representation::Tagged());
@@ -5080,6 +5106,8 @@ class HAllocate: public HTemplateInstruction<2> {
Flags flags_;
Handle<Map> known_initial_map_;
+ HAllocate* dominating_allocate_;
+ HConstant* filler_free_space_size_;
};
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | src/hydrogen-instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698