summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Guillaume "Vermeille" Sanchez <guillaumesa@google.com> 2015-05-20 17:52:13 +0100
committer Guillaume "Vermeille" Sanchez <guillaumesa@google.com> 2015-05-29 11:43:04 +0100
commit104fd8a3f30ddcf07831250571aa2a233cd5c04d (patch)
tree7aec8353b7d3906da500595fc81de11ad6f1ad40 /compiler/optimizing/builder.cc
parent81d804a51d4fc415e1544a5a09505db049f4eda6 (diff)
Bring Reference Type Propagation to Instance/StaticInstanceField
For this, we need the field index in FieldInfo, hence the add of the field. Change-Id: Id219bd826d8496acf3981307a8c42e2eb6ddb712
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc27
1 files changed, 19 insertions, 8 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index c4f033df52..edce9487f8 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -824,13 +824,17 @@ bool HGraphBuilder::BuildInstanceFieldAccess(const Instruction& instruction,
value,
field_type,
resolved_field->GetOffset(),
- resolved_field->IsVolatile()));
+ resolved_field->IsVolatile(),
+ field_index,
+ *dex_file_));
} else {
current_block_->AddInstruction(new (arena_) HInstanceFieldGet(
current_block_->GetLastInstruction(),
field_type,
resolved_field->GetOffset(),
- resolved_field->IsVolatile()));
+ resolved_field->IsVolatile(),
+ field_index,
+ *dex_file_));
UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction());
}
@@ -932,13 +936,20 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction,
temps.Add(cls);
HInstruction* value = LoadLocal(source_or_dest_reg, field_type);
DCHECK_EQ(value->GetType(), field_type);
- current_block_->AddInstruction(
- new (arena_) HStaticFieldSet(cls, value, field_type, resolved_field->GetOffset(),
- resolved_field->IsVolatile()));
+ current_block_->AddInstruction(new (arena_) HStaticFieldSet(cls,
+ value,
+ field_type,
+ resolved_field->GetOffset(),
+ resolved_field->IsVolatile(),
+ field_index,
+ *dex_file_));
} else {
- current_block_->AddInstruction(
- new (arena_) HStaticFieldGet(cls, field_type, resolved_field->GetOffset(),
- resolved_field->IsVolatile()));
+ current_block_->AddInstruction(new (arena_) HStaticFieldGet(cls,
+ field_type,
+ resolved_field->GetOffset(),
+ resolved_field->IsVolatile(),
+ field_index,
+ *dex_file_));
UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction());
}
return true;