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

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

Issue 22915007: Clear next map word when folding allocations into js arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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') | src/hydrogen-instructions.cc » ('J')
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 5108 matching lines...) Expand 10 before | Expand all | Expand 10 after
5119 ALLOCATE_IN_OLD_POINTER_SPACE = 1 << 2, 5119 ALLOCATE_IN_OLD_POINTER_SPACE = 1 << 2,
5120 ALLOCATE_DOUBLE_ALIGNED = 1 << 3, 5120 ALLOCATE_DOUBLE_ALIGNED = 1 << 3,
5121 PREFILL_WITH_FILLER = 1 << 4 5121 PREFILL_WITH_FILLER = 1 << 4
5122 }; 5122 };
5123 5123
5124 HAllocate(HValue* context, 5124 HAllocate(HValue* context,
5125 HValue* size, 5125 HValue* size,
5126 HType type, 5126 HType type,
5127 PretenureFlag pretenure_flag, 5127 PretenureFlag pretenure_flag,
5128 InstanceType instance_type) 5128 InstanceType instance_type)
5129 : HTemplateInstruction<2>(type) { 5129 : HTemplateInstruction<2>(type),
5130 clear_next_map_word_(false) {
5130 SetOperandAt(0, context); 5131 SetOperandAt(0, context);
5131 SetOperandAt(1, size); 5132 SetOperandAt(1, size);
5132 set_representation(Representation::Tagged()); 5133 set_representation(Representation::Tagged());
5133 SetFlag(kTrackSideEffectDominators); 5134 SetFlag(kTrackSideEffectDominators);
5134 SetGVNFlag(kChangesNewSpacePromotion); 5135 SetGVNFlag(kChangesNewSpacePromotion);
5135 SetGVNFlag(kDependsOnNewSpacePromotion); 5136 SetGVNFlag(kDependsOnNewSpacePromotion);
5136 flags_ = pretenure_flag == TENURED 5137 flags_ = pretenure_flag == TENURED
5137 ? (Heap::TargetSpaceId(instance_type) == OLD_POINTER_SPACE 5138 ? (Heap::TargetSpaceId(instance_type) == OLD_POINTER_SPACE
5138 ? ALLOCATE_IN_OLD_POINTER_SPACE : ALLOCATE_IN_OLD_DATA_SPACE) 5139 ? ALLOCATE_IN_OLD_POINTER_SPACE : ALLOCATE_IN_OLD_DATA_SPACE)
5139 : ALLOCATE_IN_NEW_SPACE; 5140 : ALLOCATE_IN_NEW_SPACE;
5140 if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) { 5141 if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) {
5141 flags_ = static_cast<HAllocate::Flags>(flags_ | 5142 flags_ = static_cast<HAllocate::Flags>(flags_ |
5142 ALLOCATE_DOUBLE_ALIGNED); 5143 ALLOCATE_DOUBLE_ALIGNED);
5143 } 5144 }
5144 } 5145 }
5145 5146
5146 Flags flags_; 5147 Flags flags_;
5147 Handle<Map> known_initial_map_; 5148 Handle<Map> known_initial_map_;
5149 bool clear_next_map_word_;
mvstanton 2013/08/26 10:01:27 Actually, do you need this boolean, since you hand
Hannes Payer (out of office) 2013/08/26 11:51:07 Yes, otherwise would create n stores, where n is t
5148 }; 5150 };
5149 5151
5150 5152
5151 class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<1> { 5153 class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<1> {
5152 public: 5154 public:
5153 static HInnerAllocatedObject* New(Zone* zone, 5155 static HInnerAllocatedObject* New(Zone* zone,
5154 HValue* context, 5156 HValue* context,
5155 HValue* value, 5157 HValue* value,
5156 int offset, 5158 int offset,
5157 HType type = HType::Tagged()) { 5159 HType type = HType::Tagged()) {
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
6793 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 6795 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
6794 }; 6796 };
6795 6797
6796 6798
6797 #undef DECLARE_INSTRUCTION 6799 #undef DECLARE_INSTRUCTION
6798 #undef DECLARE_CONCRETE_INSTRUCTION 6800 #undef DECLARE_CONCRETE_INSTRUCTION
6799 6801
6800 } } // namespace v8::internal 6802 } } // namespace v8::internal
6801 6803
6802 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6804 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« 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