Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(856)

Unified Diff: runtime/vm/kernel_to_il.h

Issue 2852943003: Move the Kernel string offsets into the VM's heap. (Closed)
Patch Set: Incorporate review comments. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/kernel_reader.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.h
diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
index 148ecd6e1fc7643301ef672af155444a883d2916..503890662f4a195652df6530f9570f1540d01eee 100644
--- a/runtime/vm/kernel_to_il.h
+++ b/runtime/vm/kernel_to_il.h
@@ -281,10 +281,16 @@ class TranslationHelper {
Heap::Space allocation_space() { return allocation_space_; }
// Access to strings.
+ const TypedData& string_offsets() { return string_offsets_; }
+ void SetStringOffsets(const TypedData& string_data);
+
const TypedData& string_data() { return string_data_; }
void SetStringData(const TypedData& string_data);
- uint8_t CharacterAt(String* str, intptr_t index);
- bool StringEquals(String* str, const char* other);
+
+ intptr_t StringOffset(intptr_t string_index) const;
+ intptr_t StringSize(intptr_t string_index) const;
+ uint8_t CharacterAt(intptr_t string_index, intptr_t index);
+ bool StringEquals(intptr_t string_index, const char* other);
// Predicates on CanonicalNames.
bool IsAdministrative(CanonicalName* name);
@@ -312,10 +318,10 @@ class TranslationHelper {
}
const dart::String& DartString(const char* content, Heap::Space space);
- dart::String& DartString(String* content) {
- return DartString(content, allocation_space_);
+ dart::String& DartString(intptr_t string_index) {
+ return DartString(string_index, allocation_space_);
}
- dart::String& DartString(String* content, Heap::Space space);
+ dart::String& DartString(intptr_t string_index, Heap::Space space);
dart::String& DartString(const uint8_t* utf8_array, intptr_t len) {
return DartString(utf8_array, len, allocation_space_);
@@ -325,7 +331,7 @@ class TranslationHelper {
Heap::Space space);
const dart::String& DartSymbol(const char* content) const;
- dart::String& DartSymbol(String* content) const;
+ dart::String& DartSymbol(intptr_t string_index) const;
dart::String& DartSymbol(const uint8_t* utf8_array, intptr_t len) const;
const dart::String& DartClassName(CanonicalName* kernel_class);
@@ -378,15 +384,16 @@ class TranslationHelper {
dart::String* name_to_modify,
bool symbolize = true);
- const dart::String& DartSetterName(CanonicalName* parent, String* setter);
- const dart::String& DartGetterName(CanonicalName* parent, String* getter);
- const dart::String& DartMethodName(CanonicalName* parent, String* method);
+ const dart::String& DartSetterName(CanonicalName* parent, intptr_t setter);
+ const dart::String& DartGetterName(CanonicalName* parent, intptr_t getter);
+ const dart::String& DartMethodName(CanonicalName* parent, intptr_t method);
Thread* thread_;
Zone* zone_;
Isolate* isolate_;
Heap::Space allocation_space_;
+ TypedData& string_offsets_;
TypedData& string_data_;
};
« no previous file with comments | « runtime/vm/kernel_reader.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698