1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 11:55:40 +02:00

Bug 454502: make dwarf use valueof instead of number constructor

This may improve both memory and cpu performance. (SLIGHTLY)

Change-Id: I05c06b017b9d8e4505a17e99cde6c024bca21dd4
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/37783
Tested-by: Hudson CI
Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
This commit is contained in:
Matthew Khouzam 2014-12-08 22:33:30 -05:00 committed by Elena Laskavaia
parent ae4ed4d438
commit 67f46bce5b

View file

@ -534,7 +534,7 @@ public class Dwarf {
}
Map<Long, AbbreviationEntry> parseDebugAbbreviation(CompilationUnitHeader header) throws IOException {
Integer key = new Integer(header.abbreviationOffset);
Integer key = Integer.valueOf(header.abbreviationOffset);
Map<Long, AbbreviationEntry> abbrevs = abbreviationMaps.get(key);
if (abbrevs == null) {
abbrevs = new HashMap<Long, AbbreviationEntry>();
@ -644,27 +644,27 @@ public class Dwarf {
break;
case DwarfConstants.DW_FORM_data1 :
obj = new Byte(in.get());
obj = Byte.valueOf(in.get());
break;
case DwarfConstants.DW_FORM_data2 :
obj = new Short(read_2_bytes(in));
obj = Short.valueOf(read_2_bytes(in));
break;
case DwarfConstants.DW_FORM_data4 :
obj = new Integer(read_4_bytes(in));
obj = Integer.valueOf(read_4_bytes(in));
break;
case DwarfConstants.DW_FORM_data8 :
obj = new Long(read_8_bytes(in));
obj = Long.valueOf(read_8_bytes(in));
break;
case DwarfConstants.DW_FORM_sdata :
obj = new Long(read_signed_leb128(in));
obj = Long.valueOf(read_signed_leb128(in));
break;
case DwarfConstants.DW_FORM_udata :
obj = new Long(read_unsigned_leb128(in));
obj = Long.valueOf(read_unsigned_leb128(in));
break;
case DwarfConstants.DW_FORM_string :
@ -682,7 +682,7 @@ public class Dwarf {
break;
case DwarfConstants.DW_FORM_flag :
obj = new Byte(in.get());
obj = Byte.valueOf(in.get());
break;
case DwarfConstants.DW_FORM_strp :
@ -742,23 +742,23 @@ public class Dwarf {
break;
case DwarfConstants.DW_FORM_ref1 :
obj = new Byte(in.get());
obj = Byte.valueOf(in.get());
break;
case DwarfConstants.DW_FORM_ref2 :
obj = new Short(read_2_bytes(in));
obj = Short.valueOf(read_2_bytes(in));
break;
case DwarfConstants.DW_FORM_ref4 :
obj = new Integer(read_4_bytes(in));
obj = Integer.valueOf(read_4_bytes(in));
break;
case DwarfConstants.DW_FORM_ref8 :
obj = new Long(read_8_bytes(in));
obj = Long.valueOf(read_8_bytes(in));
break;
case DwarfConstants.DW_FORM_ref_udata :
obj = new Long(read_unsigned_leb128(in));
obj = Long.valueOf(read_unsigned_leb128(in));
break;
case DwarfConstants.DW_FORM_indirect :