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

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 b4fc65635f47b6db2396208e73b0b3b9e124f996..74ebffa27f8110a466dedd994281d24cbe4ba441 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3228,8 +3228,27 @@ class HConstant: public HTemplateInstruction<0> {
DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation);
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double);
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>);
+ DECLARE_INSTRUCTION_FACTORY_P2(HConstant, Handle<Map>, UniqueValueId);
DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference);
+ static HConstant* CreateAndInsertAfter(Zone* zone,
+ HValue* context,
+ int32_t value,
+ HInstruction* instruction) {
+ HConstant* new_constant = HConstant::New(zone, context, value);
+ new_constant->InsertAfter(instruction);
+ return new_constant;
+ }
+
+ static HConstant* CreateAndInsertBefore(Zone* zone,
+ HValue* context,
+ int32_t value,
+ HInstruction* instruction) {
+ HConstant* new_constant = HConstant::New(zone, context, value);
+ new_constant->InsertBefore(instruction);
+ return new_constant;
+ }
+
Handle<Object> handle() {
if (handle_.is_null()) {
Factory* factory = Isolate::Current()->factory();
@@ -3430,6 +3449,8 @@ class HConstant: public HTemplateInstruction<0> {
bool is_not_in_new_space,
bool is_cell,
bool boolean_value);
+ HConstant(Handle<Map> handle,
+ UniqueValueId unique_id);
explicit HConstant(ExternalReference reference);
void Initialize(Representation r);
@@ -5063,10 +5084,6 @@ class HAllocate: public HTemplateInstruction<2> {
flags_ = static_cast<HAllocate::Flags>(flags_ | ALLOCATE_DOUBLE_ALIGNED);
}
- void UpdateSize(HValue* size) {
- SetOperandAt(1, size);
- }
-
virtual void HandleSideEffectDominator(GVNFlag side_effect,
HValue* dominator);
@@ -5088,7 +5105,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());
@@ -5105,8 +5124,27 @@ class HAllocate: public HTemplateInstruction<2> {
}
}
+ void UpdateSize(HValue* size) {
+ SetOperandAt(1, size);
+ }
+
+ HAllocate* GetFoldableDominator(HAllocate* dominator);
+
+ void UpdateFreeSpaceFiller(int32_t filler_size);
+
+ void CreateFreeSpaceFiller(int32_t filler_size);
+
+ bool IsFoldable(HAllocate* allocate) {
+ return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) ||
+ (IsOldDataSpaceAllocation() && allocate->IsOldDataSpaceAllocation()) ||
+ (IsOldPointerSpaceAllocation() &&
+ allocate->IsOldPointerSpaceAllocation());
+ }
+
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