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

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

Issue 2786083002: Read platform.dill in the VM. (Closed)
Patch Set: Allow main to be a field or getter. 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 unified diff | Download patch
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_READER_H_ 5 #ifndef RUNTIME_VM_KERNEL_READER_H_
6 #define RUNTIME_VM_KERNEL_READER_H_ 6 #define RUNTIME_VM_KERNEL_READER_H_
7 7
8 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
9 #include <map> 9 #include <map>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 private: 47 private:
48 typedef MallocMap<KernelType, VmType*> MapType; 48 typedef MallocMap<KernelType, VmType*> MapType;
49 MapType map_; 49 MapType map_;
50 }; 50 };
51 51
52 class KernelReader { 52 class KernelReader {
53 public: 53 public:
54 explicit KernelReader(Program* program); 54 explicit KernelReader(Program* program);
55 55
56 // Returns either a library or a failure object. 56 // Returns the library containing the main procedure, null if there
57 // was no main procedure, or a failure object if there was an error.
57 dart::Object& ReadProgram(); 58 dart::Object& ReadProgram();
58 59
59 static void SetupFunctionParameters(TranslationHelper translation_helper_, 60 static void SetupFunctionParameters(TranslationHelper translation_helper_,
60 DartTypeTranslator type_translator_, 61 DartTypeTranslator type_translator_,
61 const dart::Class& owner, 62 const dart::Class& owner,
62 const dart::Function& function, 63 const dart::Function& function,
63 FunctionNode* kernel_function, 64 FunctionNode* kernel_function,
64 bool is_method, 65 bool is_method,
65 bool is_closure); 66 bool is_closure);
66 67
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 GrowableArray<const dart::Function*> functions_; 116 GrowableArray<const dart::Function*> functions_;
116 GrowableArray<const dart::Field*> fields_; 117 GrowableArray<const dart::Field*> fields_;
117 }; 118 };
118 119
119 } // namespace kernel 120 } // namespace kernel
120 } // namespace dart 121 } // namespace dart
121 122
122 #endif // !defined(DART_PRECOMPILED_RUNTIME) 123 #endif // !defined(DART_PRECOMPILED_RUNTIME)
123 #endif // RUNTIME_VM_KERNEL_READER_H_ 124 #endif // RUNTIME_VM_KERNEL_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698