diff options
author | 2015-05-07 10:57:03 +0000 | |
---|---|---|
committer | 2015-05-07 10:57:04 +0000 | |
commit | f07f71f9af8f56e738ef0451c60734ec6022d08e (patch) | |
tree | 48f4a1f6158234c3257ed75405122b1fb0941f96 /compiler/optimizing/nodes.cc | |
parent | 46a4b26855ae9fcd14c6e4435f37f09ceb134f61 (diff) | |
parent | 8c0c91a845568624815df026cfdac8c42ecccdf6 (diff) |
Merge "Use a growable array instead of an environment during SSA."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index ab56aff32f..85c0361f46 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -500,6 +500,16 @@ void HBasicBlock::RemoveInstructionOrPhi(HInstruction* instruction, bool ensure_ } } +void HEnvironment::CopyFrom(const GrowableArray<HInstruction*>& locals) { + for (size_t i = 0; i < locals.Size(); i++) { + HInstruction* instruction = locals.Get(i); + SetRawEnvAt(i, instruction); + if (instruction != nullptr) { + instruction->AddEnvUseAt(this, i); + } + } +} + void HEnvironment::CopyFrom(HEnvironment* env) { for (size_t i = 0; i < env->Size(); i++) { HInstruction* instruction = env->GetInstructionAt(i); |