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

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

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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/pages_test.cc ('k') | runtime/vm/parser.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_PARSER_H_ 5 #ifndef RUNTIME_VM_PARSER_H_
6 #define RUNTIME_VM_PARSER_H_ 6 #define RUNTIME_VM_PARSER_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "lib/invocation_mirror.h"
10 #include "platform/assert.h" 11 #include "platform/assert.h"
11 #include "platform/globals.h" 12 #include "platform/globals.h"
12 #include "lib/invocation_mirror.h"
13 #include "vm/allocation.h" 13 #include "vm/allocation.h"
14 #include "vm/ast.h" 14 #include "vm/ast.h"
15 #include "vm/class_finalizer.h" 15 #include "vm/class_finalizer.h"
16 #include "vm/compiler_stats.h" 16 #include "vm/compiler_stats.h"
17 #include "vm/hash_table.h"
17 #include "vm/kernel.h" 18 #include "vm/kernel.h"
18 #include "vm/hash_table.h"
19 #include "vm/object.h" 19 #include "vm/object.h"
20 #include "vm/raw_object.h" 20 #include "vm/raw_object.h"
21 #include "vm/token.h" 21 #include "vm/token.h"
22 22
23 namespace dart { 23 namespace dart {
24 24
25 // Forward declarations. 25 // Forward declarations.
26 26
27 namespace kernel { 27 namespace kernel {
28 28
29 class ScopeBuildingResult; 29 class ScopeBuildingResult;
30 30
31 } // kernel 31 } // namespace kernel
32 32
33 class ArgumentsDescriptor; 33 class ArgumentsDescriptor;
34 class Isolate; 34 class Isolate;
35 class LocalScope; 35 class LocalScope;
36 class LocalVariable; 36 class LocalVariable;
37 struct RegExpCompileData; 37 struct RegExpCompileData;
38 class SourceLabel; 38 class SourceLabel;
39 template <typename T> 39 template <typename T>
40 class GrowableArray; 40 class GrowableArray;
41 class Parser; 41 class Parser;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 void set_default_parameter_values(ZoneGrowableArray<const Instance*>* list) { 153 void set_default_parameter_values(ZoneGrowableArray<const Instance*>* list) {
154 default_parameter_values_ = list; 154 default_parameter_values_ = list;
155 #if defined(DEBUG) 155 #if defined(DEBUG)
156 if (list == NULL) return; 156 if (list == NULL) return;
157 for (intptr_t i = 0; i < list->length(); i++) { 157 for (intptr_t i = 0; i < list->length(); i++) {
158 ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->InVMHeap()); 158 ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->InVMHeap());
159 } 159 }
160 #endif 160 #endif
161 } 161 }
162 162
163
164 const Instance& DefaultParameterValueAt(intptr_t i) const { 163 const Instance& DefaultParameterValueAt(intptr_t i) const {
165 ASSERT(default_parameter_values_ != NULL); 164 ASSERT(default_parameter_values_ != NULL);
166 return *default_parameter_values_->At(i); 165 return *default_parameter_values_->At(i);
167 } 166 }
168 167
169 ZoneGrowableArray<const Instance*>* default_parameter_values() const { 168 ZoneGrowableArray<const Instance*>* default_parameter_values() const {
170 return default_parameter_values_; 169 return default_parameter_values_;
171 } 170 }
172 171
173 LocalVariable* current_context_var() const { return current_context_var_; } 172 LocalVariable* current_context_var() const { return current_context_var_; }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 int num_copied_params_; 253 int num_copied_params_;
255 int num_stack_locals_; 254 int num_stack_locals_;
256 bool have_seen_await_expr_; 255 bool have_seen_await_expr_;
257 256
258 kernel::ScopeBuildingResult* kernel_scopes_; 257 kernel::ScopeBuildingResult* kernel_scopes_;
259 258
260 friend class Parser; 259 friend class Parser;
261 DISALLOW_COPY_AND_ASSIGN(ParsedFunction); 260 DISALLOW_COPY_AND_ASSIGN(ParsedFunction);
262 }; 261 };
263 262
264
265 class Parser : public ValueObject { 263 class Parser : public ValueObject {
266 public: 264 public:
267 // Parse the top level of a whole script file and register declared classes 265 // Parse the top level of a whole script file and register declared classes
268 // in the given library. 266 // in the given library.
269 static void ParseCompilationUnit(const Library& library, 267 static void ParseCompilationUnit(const Library& library,
270 const Script& script); 268 const Script& script);
271 269
272 // Parse top level of a class and register all functions/fields. 270 // Parse top level of a class and register all functions/fields.
273 static void ParseClass(const Class& cls); 271 static void ParseClass(const Class& cls);
274 272
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 1026
1029 intptr_t recursion_counter_; 1027 intptr_t recursion_counter_;
1030 friend class RecursionChecker; 1028 friend class RecursionChecker;
1031 1029
1032 DISALLOW_COPY_AND_ASSIGN(Parser); 1030 DISALLOW_COPY_AND_ASSIGN(Parser);
1033 }; 1031 };
1034 1032
1035 } // namespace dart 1033 } // namespace dart
1036 1034
1037 #endif // RUNTIME_VM_PARSER_H_ 1035 #endif // RUNTIME_VM_PARSER_H_
OLDNEW
« no previous file with comments | « runtime/vm/pages_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698