From ef7d42fca18c16fbaf103822ad16f23246e2905d Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Mon, 6 Jan 2014 12:55:46 -0800 Subject: 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 --- compiler/compiled_method.h | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'compiler/compiled_method.h') 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& code); + const std::vector& 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& GetCode() const { - return *code_; + const std::vector* GetPortableCode() const { + return portable_code_; } - void SetCode(const std::vector& code); - - bool operator==(const CompiledCode& rhs) const { - return (code_ == rhs.code_); + const std::vector* GetQuickCode() const { + return quick_code_; } + void SetCode(const std::vector* quick_code, const std::vector* 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& 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* code_; + // The ELF image for portable. + std::vector* portable_code_; + + // Used to store the PIC code for Quick. + std::vector* 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& code, + const std::vector& 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& vmap_table, const std::vector& native_gc_map); - // Constructs a CompiledMethod for the JniCompiler. + // Constructs a CompiledMethod for the QuickJniCompiler. CompiledMethod(CompilerDriver& driver, InstructionSet instruction_set, - const std::vector& code, + const std::vector& quick_code, const size_t frame_size_in_bytes, const uint32_t core_spill_mask, const uint32_t fp_spill_mask); -- cgit v1.2.3-59-g8ed1b