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
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index c4f033d..edce948 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -824,13 +824,17 @@
         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 @@
     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;