OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
7 #include "src/compiler/register-allocator.h" | 7 #include "src/compiler/register-allocator.h" |
8 #include "src/string-stream.h" | 8 #include "src/string-stream.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 void UsePosition::ResolveHint(UsePosition* use_pos) { | 189 void UsePosition::ResolveHint(UsePosition* use_pos) { |
190 DCHECK_NOT_NULL(use_pos); | 190 DCHECK_NOT_NULL(use_pos); |
191 if (HintTypeField::decode(flags_) != UsePositionHintType::kUnresolved) return; | 191 if (HintTypeField::decode(flags_) != UsePositionHintType::kUnresolved) return; |
192 hint_ = use_pos; | 192 hint_ = use_pos; |
193 flags_ = HintTypeField::update(flags_, UsePositionHintType::kUsePos); | 193 flags_ = HintTypeField::update(flags_, UsePositionHintType::kUsePos); |
194 } | 194 } |
195 | 195 |
196 | 196 |
197 void UsePosition::set_type(UsePositionType type, bool register_beneficial) { | 197 void UsePosition::set_type(UsePositionType type, bool register_beneficial) { |
198 DCHECK_IMPLIES(type == UsePositionType::kRequiresSlot, !register_beneficial); | 198 DCHECK_IMPLIES(type == UsePositionType::kRequiresSlot, !register_beneficial); |
| 199 DCHECK_EQ(kUnassignedRegister, AssignedRegisterField::decode(flags_)); |
199 flags_ = TypeField::encode(type) | | 200 flags_ = TypeField::encode(type) | |
200 RegisterBeneficialField::encode(register_beneficial); | 201 RegisterBeneficialField::encode(register_beneficial) | |
| 202 HintTypeField::encode(HintTypeField::decode(flags_)) | |
| 203 AssignedRegisterField::encode(kUnassignedRegister); |
201 } | 204 } |
202 | 205 |
203 | 206 |
204 UseInterval* UseInterval::SplitAt(LifetimePosition pos, Zone* zone) { | 207 UseInterval* UseInterval::SplitAt(LifetimePosition pos, Zone* zone) { |
205 DCHECK(Contains(pos) && pos != start()); | 208 DCHECK(Contains(pos) && pos != start()); |
206 auto after = new (zone) UseInterval(pos, end_); | 209 auto after = new (zone) UseInterval(pos, end_); |
207 after->next_ = next_; | 210 after->next_ = next_; |
208 next_ = nullptr; | 211 next_ = nullptr; |
209 end_ = pos; | 212 end_ = pos; |
210 return after; | 213 return after; |
(...skipping 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 auto eliminate = moves->PrepareInsertAfter(move); | 3059 auto eliminate = moves->PrepareInsertAfter(move); |
3057 to_insert.push_back(move); | 3060 to_insert.push_back(move); |
3058 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 3061 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
3059 } | 3062 } |
3060 } | 3063 } |
3061 | 3064 |
3062 | 3065 |
3063 } // namespace compiler | 3066 } // namespace compiler |
3064 } // namespace internal | 3067 } // namespace internal |
3065 } // namespace v8 | 3068 } // namespace v8 |
OLD | NEW |