summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-12-13 09:34:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2016-12-13 09:34:12 +0000
commitfb678bfaad7f432861d26bde8343d53fadd68c07 (patch)
treeb39b2c10875b15207e9de9b7474b1834aa9aa6ff /compiler/optimizing/code_generator.cc
parent7c73bf3518eea7544406eadfed6946411c54a267 (diff)
parent22384aeab988df7fa5ccdc48a668589c5f602c39 (diff)
Merge "Revert "Revert "Add kJitTableAddress for HLoadClass."""
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index fa6a5225e7..402eeee65f 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -1402,6 +1402,14 @@ void CodeGenerator::EmitJitRoots(uint8_t* code,
entry.second = index;
++index;
}
+ for (auto& entry : jit_class_roots_) {
+ // Update the `roots` with the class, and replace the address temporarily
+ // stored to the index in the table.
+ uint64_t address = entry.second;
+ roots->Set(index, reinterpret_cast<StackReference<mirror::Class>*>(address)->AsMirrorPtr());
+ entry.second = index;
+ ++index;
+ }
EmitJitRootPatches(code, roots_data);
}