summaryrefslogtreecommitdiff
path: root/src/compiled_method.h
diff options
context:
space:
mode:
author Logan Chien <loganchien@google.com> 2012-05-01 15:47:55 +0800
committer Shih-wei Liao <sliao@google.com> 2012-06-27 03:47:58 -0700
commit971bf3f9184010d68b9a3ad30b396fa401af91a3 (patch)
tree493e80309ce41fd21359da8093fbebfd21b7936c /src/compiled_method.h
parent468a7b1fcb2114ec973e31b5276daea0be62c198 (diff)
Compile method one-by-one.
Change-Id: Ic56fb397f3bd6dee32372eb875261a3383eaf30c
Diffstat (limited to 'src/compiled_method.h')
-rw-r--r--src/compiled_method.h40
1 files changed, 5 insertions, 35 deletions
diff --git a/src/compiled_method.h b/src/compiled_method.h
index 7ddde0c730..ca3a597149 100644
--- a/src/compiled_method.h
+++ b/src/compiled_method.h
@@ -32,22 +32,14 @@ namespace art {
class CompiledCode {
public:
CompiledCode(InstructionSet instruction_set)
- : instruction_set_(instruction_set), elf_idx_(-1), elf_func_idx_(-1) {
+ : instruction_set_(instruction_set) {
}
CompiledCode(InstructionSet instruction_set, const std::vector<uint8_t>& code)
- : instruction_set_(instruction_set), code_(code), elf_idx_(-1),
- elf_func_idx_(-1) {
+ : instruction_set_(instruction_set), code_(code) {
CHECK_NE(code.size(), 0U);
}
- CompiledCode(InstructionSet instruction_set,
- uint16_t elf_idx,
- uint16_t elf_func_idx)
- : instruction_set_(instruction_set), elf_idx_(elf_idx),
- elf_func_idx_(elf_func_idx) {
- }
-
InstructionSet GetInstructionSet() const {
return instruction_set_;
}
@@ -57,6 +49,7 @@ class CompiledCode {
}
void SetCode(const std::vector<uint8_t>& code) {
+ CHECK_NE(code.size(), 0U);
code_ = code;
}
@@ -64,18 +57,6 @@ class CompiledCode {
return (code_ == rhs.code_);
}
- bool IsExecutableInElf() const {
- return (elf_idx_ != static_cast<uint16_t>(-1u));
- }
-
- uint16_t GetElfIndex() const {
- return elf_idx_;
- }
-
- uint16_t GetElfFuncIndex() const {
- return elf_func_idx_;
- }
-
// 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.
@@ -95,10 +76,6 @@ class CompiledCode {
private:
const InstructionSet instruction_set_;
std::vector<uint8_t> code_;
-
- // LLVM-specific fields
- uint16_t elf_idx_;
- uint16_t elf_func_idx_;
};
class CompiledMethod : public CompiledCode {
@@ -124,9 +101,8 @@ class CompiledMethod : public CompiledCode {
// Constructs a CompiledMethod for the LLVM compiler.
CompiledMethod(InstructionSet instruction_set,
- uint16_t elf_idx,
- uint16_t elf_func_idx)
- : CompiledCode(instruction_set, elf_idx, elf_func_idx),
+ const std::vector<uint8_t>& code)
+ : CompiledCode(instruction_set, code),
frame_size_in_bytes_(kStackAlignment), core_spill_mask_(0),
fp_spill_mask_(0) {
}
@@ -162,12 +138,6 @@ class CompiledInvokeStub : public CompiledCode {
explicit CompiledInvokeStub(InstructionSet instruction_set,
const std::vector<uint8_t>& code);
- explicit CompiledInvokeStub(InstructionSet instruction_set,
- uint16_t elf_idx,
- uint16_t elf_func_idx)
- : CompiledCode(instruction_set, elf_idx, elf_func_idx) {
- }
-
~CompiledInvokeStub();
};