diff options
author | Vladimir Marko <vmarko@google.com> | 2015-02-19 15:50:28 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2015-02-19 18:02:20 +0000 |
commit | 80b96d1a76790527f72a660ac03d9c215eed17ce (patch) | |
tree | 8af6fb3840c60c65887cd5de64d987058bb8986e /compiler/elf_writer_quick.cc | |
parent | 39109a06015c91188232e59fa9e60e0915d24cd7 (diff) | |
download | art-80b96d1a76790527f72a660ac03d9c215eed17ce.zip art-80b96d1a76790527f72a660ac03d9c215eed17ce.tar.gz art-80b96d1a76790527f72a660ac03d9c215eed17ce.tar.bz2 |
Replace a few std::vector with ArenaVector in Mir2Lir.
Change-Id: I7867d60afc60f57cdbbfd312f02883854d65c805
Diffstat (limited to 'compiler/elf_writer_quick.cc')
-rw-r--r-- | compiler/elf_writer_quick.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc index 9ec4f28..401d5a9 100644 --- a/compiler/elf_writer_quick.cc +++ b/compiler/elf_writer_quick.cc @@ -90,19 +90,19 @@ std::vector<uint8_t>* ConstructCIEFrameX86(bool is_x86_64) { // Length (will be filled in later in this routine). if (is_x86_64) { - PushWord(cfi_info, 0xffffffff); // Indicates 64bit - PushWord(cfi_info, 0); - PushWord(cfi_info, 0); + Push32(cfi_info, 0xffffffff); // Indicates 64bit + Push32(cfi_info, 0); + Push32(cfi_info, 0); } else { - PushWord(cfi_info, 0); + Push32(cfi_info, 0); } // CIE id: always 0. if (is_x86_64) { - PushWord(cfi_info, 0); - PushWord(cfi_info, 0); + Push32(cfi_info, 0); + Push32(cfi_info, 0); } else { - PushWord(cfi_info, 0); + Push32(cfi_info, 0); } // Version: always 1. @@ -318,7 +318,7 @@ class LineTableGenerator FINAL : public Leb128Encoder { PushByte(data_, 0); // extended opcode: PushByte(data_, 1 + 4); // length: opcode_size + address_size PushByte(data_, DW_LNE_set_address); - PushWord(data_, addr); + Push32(data_, addr); } void SetLine(unsigned line) { @@ -507,13 +507,13 @@ static void FillInCFIInformation(OatWriter* oat_writer, // Start the debug_info section with the header information // 'unit_length' will be filled in later. int cunit_length = dbg_info->size(); - PushWord(dbg_info, 0); + Push32(dbg_info, 0); // 'version' - 3. PushHalf(dbg_info, 3); // Offset into .debug_abbrev section (always 0). - PushWord(dbg_info, 0); + Push32(dbg_info, 0); // Address size: 4. PushByte(dbg_info, 4); @@ -523,7 +523,7 @@ static void FillInCFIInformation(OatWriter* oat_writer, PushByte(dbg_info, 1); // The producer is Android dex2oat. - PushWord(dbg_info, producer_str_offset); + Push32(dbg_info, producer_str_offset); // The language is Java. PushByte(dbg_info, DW_LANG_Java); @@ -532,8 +532,8 @@ static void FillInCFIInformation(OatWriter* oat_writer, uint32_t cunit_low_pc = 0 - 1; uint32_t cunit_high_pc = 0; int cunit_low_pc_pos = dbg_info->size(); - PushWord(dbg_info, 0); - PushWord(dbg_info, 0); + Push32(dbg_info, 0); + Push32(dbg_info, 0); if (dbg_line == nullptr) { for (size_t i = 0; i < method_info.size(); ++i) { @@ -546,9 +546,9 @@ static void FillInCFIInformation(OatWriter* oat_writer, PushByte(dbg_info, 2); // Enter name, low_pc, high_pc. - PushWord(dbg_info, PushStr(dbg_str, dbg.method_name_)); - PushWord(dbg_info, dbg.low_pc_ + text_section_offset); - PushWord(dbg_info, dbg.high_pc_ + text_section_offset); + Push32(dbg_info, PushStr(dbg_str, dbg.method_name_)); + Push32(dbg_info, dbg.low_pc_ + text_section_offset); + Push32(dbg_info, dbg.high_pc_ + text_section_offset); } } else { // TODO: in gdb info functions <regexp> - reports Java functions, but @@ -559,15 +559,15 @@ static void FillInCFIInformation(OatWriter* oat_writer, // method ranges. // Line number table offset - PushWord(dbg_info, dbg_line->size()); + Push32(dbg_info, dbg_line->size()); size_t lnt_length = dbg_line->size(); - PushWord(dbg_line, 0); + Push32(dbg_line, 0); PushHalf(dbg_line, 4); // LNT Version DWARF v4 => 4 size_t lnt_hdr_length = dbg_line->size(); - PushWord(dbg_line, 0); // TODO: 64-bit uses 8-byte here + Push32(dbg_line, 0); // TODO: 64-bit uses 8-byte here PushByte(dbg_line, 1); // minimum_instruction_length (ubyte) PushByte(dbg_line, 1); // maximum_operations_per_instruction (ubyte) = always 1 @@ -629,9 +629,9 @@ static void FillInCFIInformation(OatWriter* oat_writer, PushByte(dbg_info, 2); // Enter name, low_pc, high_pc. - PushWord(dbg_info, PushStr(dbg_str, dbg.method_name_)); - PushWord(dbg_info, dbg.low_pc_ + text_section_offset); - PushWord(dbg_info, dbg.high_pc_ + text_section_offset); + Push32(dbg_info, PushStr(dbg_str, dbg.method_name_)); + Push32(dbg_info, dbg.low_pc_ + text_section_offset); + Push32(dbg_info, dbg.high_pc_ + text_section_offset); GetLineInfoForJava(dbg.dbgstream_, dbg.compiled_method_->GetSrcMappingTable(), &pc2java_map, dbg.low_pc_); |