Profiler directed clean-up of dex2oat.
Fix bad usage of std::string in: the verifier and compiler driver method
arguments, causing unnecessary boxing and allocations; in creating a symbol for
the dex compilation unit, that is only used in portable builds; in pattern
matching for intrinsics by name.
Make class linker dex and classes locks reader/writer to allow concurrent
dex cache or class querying. Refactor ComputeCompilingMethodsClass to pass in a
dex cache hint, to avoid taking any locks when the dex file of the compiling
method matches that of the field or method being resolved.
Make the RegType's HasClass method virtual to avoid frequent virtual method
dispatch. Make RegTypeCache GetFromId inlinable.
Various other bits of whitespace and formatting clean-up.
Change-Id: Id152e1e5a6fed2961dad0b612b7aa0c48001ef94
diff --git a/src/compiler/driver/dex_compilation_unit.h b/src/compiler/driver/dex_compilation_unit.h
index 0b90aaa..3c6129d 100644
--- a/src/compiler/driver/dex_compilation_unit.h
+++ b/src/compiler/driver/dex_compilation_unit.h
@@ -92,9 +92,7 @@
return ((access_flags_ & kAccSynchronized) != 0);
}
- const std::string& GetSymbol() const {
- return symbol_;
- }
+ const std::string& GetSymbol();
private:
CompilationUnit* const cu_;
@@ -110,7 +108,7 @@
const uint32_t dex_method_idx_;
const uint32_t access_flags_;
- const std::string symbol_;
+ std::string symbol_;
};
} // namespace art