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

Side by Side Diff: runtime/vm/kernel_to_il.h

Issue 2772803002: Revert "Use canonical names for some name-based lookup." (Closed)
Patch Set: Created 3 years, 9 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_VM_KERNEL_TO_IL_H_ 5 #ifndef RUNTIME_VM_KERNEL_TO_IL_H_
6 #define RUNTIME_VM_KERNEL_TO_IL_H_ 6 #define RUNTIME_VM_KERNEL_TO_IL_H_
7 7
8 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
9 9
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 const dart::String& DartString(const char* content, Heap::Space space); 246 const dart::String& DartString(const char* content, Heap::Space space);
247 247
248 dart::String& DartString(String* content) { 248 dart::String& DartString(String* content) {
249 return DartString(content, allocation_space_); 249 return DartString(content, allocation_space_);
250 } 250 }
251 dart::String& DartString(String* content, Heap::Space space); 251 dart::String& DartString(String* content, Heap::Space space);
252 252
253 const dart::String& DartSymbol(const char* content) const; 253 const dart::String& DartSymbol(const char* content) const;
254 dart::String& DartSymbol(String* content) const; 254 dart::String& DartSymbol(String* content) const;
255 255
256 const dart::String& DartClassName(CanonicalName* kernel_klass); 256 const dart::String& DartClassName(Class* kernel_klass);
257 const dart::String& DartConstructorName(Constructor* node); 257 const dart::String& DartConstructorName(Constructor* node);
258 const dart::String& DartProcedureName(Procedure* procedure); 258 const dart::String& DartProcedureName(Procedure* procedure);
259 259
260 const dart::String& DartSetterName(Name* kernel_name); 260 const dart::String& DartSetterName(Name* kernel_name);
261 const dart::String& DartGetterName(Name* kernel_name); 261 const dart::String& DartGetterName(Name* kernel_name);
262 const dart::String& DartFieldName(Name* kernel_name); 262 const dart::String& DartFieldName(Name* kernel_name);
263 const dart::String& DartInitializerName(Name* kernel_name); 263 const dart::String& DartInitializerName(Name* kernel_name);
264 const dart::String& DartMethodName(Name* kernel_name); 264 const dart::String& DartMethodName(Name* kernel_name);
265 const dart::String& DartFactoryName(Class* klass, Name* kernel_name); 265 const dart::String& DartFactoryName(Class* klass, Name* kernel_name);
266 266
267 const Array& ArgumentNames(List<NamedExpression>* named); 267 const Array& ArgumentNames(List<NamedExpression>* named);
268 268
269 // A subclass overrides these when reading in the Kernel program in order to 269 // A subclass overrides these when reading in the Kernel program in order to
270 // support recursive type expressions (e.g. for "implements X" ... 270 // support recursive type expressions (e.g. for "implements X" ...
271 // annotations). 271 // annotations).
272 virtual RawLibrary* LookupLibraryByKernelLibrary(CanonicalName* library); 272 virtual RawLibrary* LookupLibraryByKernelLibrary(Library* library);
273 virtual RawClass* LookupClassByKernelClass(CanonicalName* klass); 273 virtual RawClass* LookupClassByKernelClass(Class* klass);
274 274
275 RawField* LookupFieldByKernelField(Field* field); 275 RawField* LookupFieldByKernelField(Field* field);
276 RawFunction* LookupStaticMethodByKernelProcedure(Procedure* procedure); 276 RawFunction* LookupStaticMethodByKernelProcedure(Procedure* procedure);
277 RawFunction* LookupConstructorByKernelConstructor(Constructor* constructor); 277 RawFunction* LookupConstructorByKernelConstructor(Constructor* constructor);
278 dart::RawFunction* LookupConstructorByKernelConstructor( 278 dart::RawFunction* LookupConstructorByKernelConstructor(
279 const dart::Class& owner, 279 const dart::Class& owner,
280 Constructor* constructor); 280 Constructor* constructor);
281 281
282 dart::Type& GetCanonicalType(const dart::Class& klass); 282 dart::Type& GetCanonicalType(const dart::Class& klass);
283 283
284 void ReportError(const char* format, ...); 284 void ReportError(const char* format, ...);
285 void ReportError(const Error& prev_error, const char* format, ...); 285 void ReportError(const Error& prev_error, const char* format, ...);
286 286
287 private: 287 private:
288 // This will mangle [kernel_name] (if necessary) and make the result a symbol. 288 // This will mangle [kernel_name] (if necessary) and make the result a symbol.
289 // The result will be avilable in [name_to_modify] and it is also returned. 289 // The result will be avilable in [name_to_modify] and it is also returned.
290 dart::String& ManglePrivateName(CanonicalName* kernel_library, 290 dart::String& ManglePrivateName(Library* kernel_library,
291 dart::String* name_to_modify, 291 dart::String* name_to_modify,
292 bool symbolize = true); 292 bool symbolize = true);
293 293
294 dart::Thread* thread_; 294 dart::Thread* thread_;
295 dart::Zone* zone_; 295 dart::Zone* zone_;
296 dart::Isolate* isolate_; 296 dart::Isolate* isolate_;
297 Heap::Space allocation_space_; 297 Heap::Space allocation_space_;
298 }; 298 };
299 299
300 // Regarding malformed types: 300 // Regarding malformed types:
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 namespace kernel { 1029 namespace kernel {
1030 1030
1031 RawObject* EvaluateMetadata(TreeNode* const kernel_node); 1031 RawObject* EvaluateMetadata(TreeNode* const kernel_node);
1032 RawObject* BuildParameterDescriptor(TreeNode* const kernel_node); 1032 RawObject* BuildParameterDescriptor(TreeNode* const kernel_node);
1033 1033
1034 } // namespace kernel 1034 } // namespace kernel
1035 } // namespace dart 1035 } // namespace dart
1036 1036
1037 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1037 #endif // !defined(DART_PRECOMPILED_RUNTIME)
1038 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ 1038 #endif // RUNTIME_VM_KERNEL_TO_IL_H_
OLDNEW
« 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