summaryrefslogtreecommitdiffstats
path: root/compiler/compiled_method.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-01-06 12:55:46 -0800
committerIan Rogers <irogers@google.com>2014-02-06 23:20:27 -0800
commitef7d42fca18c16fbaf103822ad16f23246e2905d (patch)
treec67eea52a349c2ea7f2c3bdda8e73933c05531a8 /compiler/compiled_method.h
parent822115a225185d2896607eb08d70ce5c7099adef (diff)
downloadandroid_art-ef7d42fca18c16fbaf103822ad16f23246e2905d.tar.gz
android_art-ef7d42fca18c16fbaf103822ad16f23246e2905d.tar.bz2
android_art-ef7d42fca18c16fbaf103822ad16f23246e2905d.zip
Object model changes to support 64bit.
Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
Diffstat (limited to 'compiler/compiled_method.h')
-rw-r--r--compiler/compiled_method.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/compiler/compiled_method.h b/compiler/compiled_method.h
index e4fedf1ab4..611230509a 100644
--- a/compiler/compiled_method.h
+++ b/compiler/compiled_method.h
@@ -36,7 +36,7 @@ class CompiledCode {
public:
// For Quick to supply an code blob
CompiledCode(CompilerDriver* compiler_driver, InstructionSet instruction_set,
- const std::vector<uint8_t>& code);
+ const std::vector<uint8_t>& quick_code);
// For Portable to supply an ELF object
CompiledCode(CompilerDriver* compiler_driver, InstructionSet instruction_set,
@@ -46,16 +46,18 @@ class CompiledCode {
return instruction_set_;
}
- const std::vector<uint8_t>& GetCode() const {
- return *code_;
+ const std::vector<uint8_t>* GetPortableCode() const {
+ return portable_code_;
}
- void SetCode(const std::vector<uint8_t>& code);
-
- bool operator==(const CompiledCode& rhs) const {
- return (code_ == rhs.code_);
+ const std::vector<uint8_t>* GetQuickCode() const {
+ return quick_code_;
}
+ void SetCode(const std::vector<uint8_t>* quick_code, const std::vector<uint8_t>* portable_code);
+
+ bool operator==(const CompiledCode& rhs) const;
+
// To align an offset from a page-aligned value to make it suitable
// for code storage. For example on ARM, to ensure that PC relative
// valu computations work out as expected.
@@ -72,19 +74,20 @@ class CompiledCode {
static const void* CodePointer(const void* code_pointer,
InstructionSet instruction_set);
-#if defined(ART_USE_PORTABLE_COMPILER)
const std::string& GetSymbol() const;
const std::vector<uint32_t>& GetOatdataOffsetsToCompliledCodeOffset() const;
void AddOatdataOffsetToCompliledCodeOffset(uint32_t offset);
-#endif
private:
- CompilerDriver* compiler_driver_;
+ CompilerDriver* const compiler_driver_;
const InstructionSet instruction_set_;
- // Used to store the PIC code for Quick and an ELF image for portable.
- std::vector<uint8_t>* code_;
+ // The ELF image for portable.
+ std::vector<uint8_t>* portable_code_;
+
+ // Used to store the PIC code for Quick.
+ std::vector<uint8_t>* quick_code_;
// Used for the Portable ELF symbol name.
const std::string symbol_;
@@ -101,7 +104,7 @@ class CompiledMethod : public CompiledCode {
// Constructs a CompiledMethod for the non-LLVM compilers.
CompiledMethod(CompilerDriver& driver,
InstructionSet instruction_set,
- const std::vector<uint8_t>& code,
+ const std::vector<uint8_t>& quick_code,
const size_t frame_size_in_bytes,
const uint32_t core_spill_mask,
const uint32_t fp_spill_mask,
@@ -109,10 +112,10 @@ class CompiledMethod : public CompiledCode {
const std::vector<uint8_t>& vmap_table,
const std::vector<uint8_t>& native_gc_map);
- // Constructs a CompiledMethod for the JniCompiler.
+ // Constructs a CompiledMethod for the QuickJniCompiler.
CompiledMethod(CompilerDriver& driver,
InstructionSet instruction_set,
- const std::vector<uint8_t>& code,
+ const std::vector<uint8_t>& quick_code,
const size_t frame_size_in_bytes,
const uint32_t core_spill_mask,
const uint32_t fp_spill_mask);