summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-03-18 17:59:20 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-03-19 08:47:01 +0000
commit92cf83e001357329cbf41fa15a6e053fab6f4933 (patch)
tree1dc03f1fb8c3f9af4021c1b82f0c5b0baee39600 /compiler/optimizing/code_generator.cc
parenta48850ba1f48066785768d2dd296448cd430d494 (diff)
downloadart-92cf83e001357329cbf41fa15a6e053fab6f4933.zip
art-92cf83e001357329cbf41fa15a6e053fab6f4933.tar.gz
art-92cf83e001357329cbf41fa15a6e053fab6f4933.tar.bz2
Run Java tests with the optimizing compiler.
Also fix a vector.reserve -> vector.resize braino, and build a GC map that dex2oat expects. Change-Id: I6acf2f90a4c32f90b79bf7709bf2e43931b98757
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index b2a69d8..bb6ac84 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -18,7 +18,11 @@
#include "code_generator_arm.h"
#include "code_generator_x86.h"
+#include "dex/verified_method.h"
+#include "driver/dex_compilation_unit.h"
+#include "gc_map_builder.h"
#include "utils/assembler.h"
+#include "verifier/dex_gc_map.h"
namespace art {
@@ -110,4 +114,14 @@ CodeGenerator* CodeGenerator::Create(ArenaAllocator* allocator,
}
}
+void CodeGenerator::BuildNativeGCMap(
+ std::vector<uint8_t>* data, const DexCompilationUnit& dex_compilation_unit) const {
+ const std::vector<uint8_t>& gc_map_raw =
+ dex_compilation_unit.GetVerifiedMethod()->GetDexGcMap();
+ verifier::DexPcToReferenceMap dex_gc_map(&(gc_map_raw)[0]);
+
+ GcMapBuilder builder(data, 0, 0, dex_gc_map.RegWidth());
+}
+
+
} // namespace art