ART: Change ArtMethod::NumArgRegisters() signature.
Take "const char*" instead of StringPiece. Avoid calling
strlen() in all callers, rely on explicit checking for
the end of the string.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 123750182
Change-Id: I189841e4ae7dcc5950616d5e5a590987618146cb
diff --git a/runtime/art_method.h b/runtime/art_method.h
index aabd093..feff91a 100644
--- a/runtime/art_method.h
+++ b/runtime/art_method.h
@@ -49,7 +49,6 @@
class OatQuickMethodHeader;
class ProfilingInfo;
class ScopedObjectAccessAlreadyRunnable;
-class StringPiece;
class ShadowFrame;
namespace mirror {
@@ -386,7 +385,7 @@
}
// Number of 32bit registers that would be required to hold all the arguments
- static size_t NumArgRegisters(const StringPiece& shorty);
+ static size_t NumArgRegisters(const char* shorty);
ALWAYS_INLINE uint32_t GetDexMethodIndex() {
return dex_method_index_;