| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/interpreter/bytecode-register-optimizer.h" | 5 #include "src/interpreter/bytecode-register-optimizer.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 namespace interpreter { | 9 namespace interpreter { |
| 10 | 10 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 RegisterFromRegisterInfoTableIndex(i), NextEquivalenceId(), true); | 201 RegisterFromRegisterInfoTableIndex(i), NextEquivalenceId(), true); |
| 202 DCHECK_EQ(register_info_table_[i]->register_value().index(), | 202 DCHECK_EQ(register_info_table_[i]->register_value().index(), |
| 203 RegisterFromRegisterInfoTableIndex(i).index()); | 203 RegisterFromRegisterInfoTableIndex(i).index()); |
| 204 } | 204 } |
| 205 accumulator_info_ = GetRegisterInfo(accumulator_); | 205 accumulator_info_ = GetRegisterInfo(accumulator_); |
| 206 DCHECK(accumulator_info_->register_value() == accumulator_); | 206 DCHECK(accumulator_info_->register_value() == accumulator_); |
| 207 } | 207 } |
| 208 | 208 |
| 209 // override | 209 // override |
| 210 Handle<BytecodeArray> BytecodeRegisterOptimizer::ToBytecodeArray( | 210 Handle<BytecodeArray> BytecodeRegisterOptimizer::ToBytecodeArray( |
| 211 int fixed_register_count, int parameter_count, | 211 Isolate* isolate, int fixed_register_count, int parameter_count, |
| 212 Handle<FixedArray> handler_table) { | 212 Handle<FixedArray> handler_table) { |
| 213 FlushState(); | 213 FlushState(); |
| 214 return next_stage_->ToBytecodeArray(fixed_register_count, parameter_count, | 214 return next_stage_->ToBytecodeArray(isolate, fixed_register_count, |
| 215 handler_table); | 215 parameter_count, handler_table); |
| 216 } | 216 } |
| 217 | 217 |
| 218 // override | 218 // override |
| 219 void BytecodeRegisterOptimizer::Write(BytecodeNode* node) { | 219 void BytecodeRegisterOptimizer::Write(BytecodeNode* node) { |
| 220 // | 220 // |
| 221 // Transfers with observable registers as the destination will be | 221 // Transfers with observable registers as the destination will be |
| 222 // immediately materialized so the source position information will | 222 // immediately materialized so the source position information will |
| 223 // be ordered correctly. | 223 // be ordered correctly. |
| 224 // | 224 // |
| 225 // Transfers without observable destination registers will initially | 225 // Transfers without observable destination registers will initially |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 if (info->materialized()) { | 618 if (info->materialized()) { |
| 619 CreateMaterializedEquivalent(info); | 619 CreateMaterializedEquivalent(info); |
| 620 } | 620 } |
| 621 info->MoveToNewEquivalenceSet(kInvalidEquivalenceId, false); | 621 info->MoveToNewEquivalenceSet(kInvalidEquivalenceId, false); |
| 622 } | 622 } |
| 623 } | 623 } |
| 624 | 624 |
| 625 } // namespace interpreter | 625 } // namespace interpreter |
| 626 } // namespace internal | 626 } // namespace internal |
| 627 } // namespace v8 | 627 } // namespace v8 |
| OLD | NEW |