Interning image strings

Change-Id: I7e93b3975fe43d91d00b8185b65e8e0fd67ff6f4
diff --git a/src/object.cc b/src/object.cc
index 3696374..d78eb24 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -359,7 +359,7 @@
 }
 
 size_t Method::NumArgArrayBytes() const {
-  String* shorty = GetShorty();
+  const String* shorty = GetShorty();
   size_t num_bytes = 0;
   for (int i = 1; i < shorty->GetLength(); ++i) {
     char ch = shorty->CharAt(i);
@@ -385,7 +385,7 @@
 // The number of reference arguments to this method including implicit this
 // pointer
 size_t Method::NumReferenceArgs() const {
-  String* shorty = GetShorty();
+  const String* shorty = GetShorty();
   size_t result = IsStatic() ? 0 : 1;  // The implicit this pointer.
   for (int i = 1; i < shorty->GetLength(); i++) {
     char ch = shorty->CharAt(i);
@@ -398,7 +398,7 @@
 
 // The number of long or double arguments
 size_t Method::NumLongOrDoubleArgs() const {
-  String* shorty = GetShorty();
+  const String* shorty = GetShorty();
   size_t result = 0;
   for (int i = 1; i < shorty->GetLength(); i++) {
     char ch = shorty->CharAt(i);
@@ -981,7 +981,7 @@
   java_lang_String_ = NULL;
 }
 
-const String* String::Intern() const {
+String* String::Intern() {
   return Runtime::Current()->GetInternTable()->InternWeak(this);
 }