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

Unified Diff: runtime/vm/kernel_reader.h

Issue 2860823002: Introduce classes for string and name indexes (Closed)
Patch Set: 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_binary_flowgraph.cc ('k') | runtime/vm/kernel_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.h
diff --git a/runtime/vm/kernel_reader.h b/runtime/vm/kernel_reader.h
index dba71cba1a55ca3e538bbf577166b6d46ed79c3c..d63b48c940a396d3e4f5ccc40f19a20c3219aa32 100644
--- a/runtime/vm/kernel_reader.h
+++ b/runtime/vm/kernel_reader.h
@@ -23,8 +23,8 @@ class BuildingTranslationHelper : public TranslationHelper {
: TranslationHelper(thread), reader_(reader) {}
virtual ~BuildingTranslationHelper() {}
- virtual RawLibrary* LookupLibraryByKernelLibrary(intptr_t library);
- virtual RawClass* LookupClassByKernelClass(intptr_t klass);
+ virtual RawLibrary* LookupLibraryByKernelLibrary(NameIndex library);
+ virtual RawClass* LookupClassByKernelClass(NameIndex klass);
private:
KernelReader* reader_;
@@ -69,11 +69,11 @@ class KernelReader {
void ReadLibrary(Library* kernel_library);
- const dart::String& DartSymbol(intptr_t string_index) {
- return translation_helper_.DartSymbol(string_index);
+ const dart::String& DartSymbol(StringIndex index) {
+ return translation_helper_.DartSymbol(index);
}
- uint8_t CharacterAt(intptr_t string_index, intptr_t index);
+ uint8_t CharacterAt(StringIndex string_index, intptr_t index);
private:
friend class BuildingTranslationHelper;
@@ -94,7 +94,8 @@ class KernelReader {
// Otherwise return klass.
const Object& ClassForScriptAt(const dart::Class& klass,
intptr_t source_uri_index);
- Script& ScriptAt(intptr_t source_uri_index, intptr_t import_uri = -1);
+ Script& ScriptAt(intptr_t source_uri_index,
+ StringIndex import_uri = StringIndex());
void GenerateFieldAccessors(const dart::Class& klass,
const dart::Field& field,
@@ -103,8 +104,8 @@ class KernelReader {
void SetupFieldAccessorFunction(const dart::Class& klass,
const dart::Function& function);
- dart::Library& LookupLibrary(intptr_t library);
- dart::Class& LookupClass(intptr_t klass);
+ dart::Library& LookupLibrary(NameIndex library);
+ dart::Class& LookupClass(NameIndex klass);
dart::RawFunction::Kind GetFunctionType(Procedure* kernel_procedure);
« no previous file with comments | « runtime/vm/kernel_binary_flowgraph.cc ('k') | runtime/vm/kernel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698