Interning image strings
Change-Id: I7e93b3975fe43d91d00b8185b65e8e0fd67ff6f4
diff --git a/src/object.h b/src/object.h
index 70a9b33..959abcb 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1940,16 +1940,9 @@
klass, false);
}
- String* GetSourceFile() const {
- DCHECK(IsLoaded());
- return GetFieldPtr<String*>(
- OFFSET_OF_OBJECT_MEMBER(Class, source_file_), false);
- }
+ String* GetSourceFile() const;
- void SetSourceFile(String* new_source_file) {
- SetFieldPtr<String*>(OFFSET_OF_OBJECT_MEMBER(Class, source_file_),
- new_source_file, false);
- }
+ void SetSourceFile(String* new_source_file);
private:
bool Implements(const Class* klass) const;
@@ -2419,7 +2412,7 @@
uint16_t CharAt(int32_t index) const;
- const String* Intern() const;
+ String* Intern();
static String* AllocFromUtf16(int32_t utf16_length,
const uint16_t* utf16_data_in,
@@ -2589,6 +2582,15 @@
new_descriptor, false);
}
+inline String* Class::GetSourceFile() const {
+ DCHECK(IsLoaded());
+ return GetFieldObject<String*>(OFFSET_OF_OBJECT_MEMBER(Class, source_file_), false);
+}
+
+inline void Class::SetSourceFile(String* new_source_file) {
+ SetFieldObject(OFFSET_OF_OBJECT_MEMBER(Class, source_file_), new_source_file, false);
+}
+
inline uint32_t Method::GetAccessFlags() const {
DCHECK(GetDeclaringClass()->IsLoaded());
return GetField32(OFFSET_OF_OBJECT_MEMBER(Method, access_flags_), false);