summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-05-26 14:34:57 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-05-26 14:34:58 +0000
commit41f27292e10792165bfdf67b9a35ccaea1a6872e (patch)
tree96888dee63e7d3ff6a0e1b6a76f453a1138dce7a /compiler/optimizing/stack_map_stream.cc
parent9470f045c89cdb3de5175266bda523b8a1c2d96d (diff)
parent6530baf76ef7a62f2d76a6735ad461d7d59cf0e4 (diff)
Merge "Move the catalog after the stack maps."
Diffstat (limited to 'compiler/optimizing/stack_map_stream.cc')
-rw-r--r--compiler/optimizing/stack_map_stream.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc
index b446815770..5663e3973d 100644
--- a/compiler/optimizing/stack_map_stream.cc
+++ b/compiler/optimizing/stack_map_stream.cc
@@ -144,14 +144,17 @@ size_t StackMapStream::PrepareForFillIn() {
// Note: use RoundUp to word-size here if you want CodeInfo objects to be word aligned.
needed_size_ = CodeInfo::kFixedSize
- + dex_register_location_catalog_size_
+ stack_maps_size_
+ + dex_register_location_catalog_size_
+ dex_register_maps_size_
+ inline_info_size_;
- dex_register_location_catalog_start_ = CodeInfo::kFixedSize;
- stack_maps_start_ = dex_register_location_catalog_start_ + dex_register_location_catalog_size_;
- dex_register_maps_start_ = stack_maps_start_ + stack_maps_size_;
+ stack_maps_start_ = CodeInfo::kFixedSize;
+ // TODO: Move the catalog at the end. It is currently too expensive at runtime
+ // to compute its size (note that we do not encode that size in the CodeInfo).
+ dex_register_location_catalog_start_ = stack_maps_start_ + stack_maps_size_;
+ dex_register_maps_start_ =
+ dex_register_location_catalog_start_ + dex_register_location_catalog_size_;
inline_infos_start_ = dex_register_maps_start_ + dex_register_maps_size_;
return needed_size_;