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

Unified Diff: runtime/vm/parser.h

Issue 63983005: Simplify the desugaring of catch clauses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated final review comments. Created 7 years, 1 month 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/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index ccdff42f6e260124d3bb5de087a2041e8e116b86..96db2911733fc441e4b6834c2ad8e07b8561da95 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -7,29 +7,33 @@
#include "include/dart_api.h"
+#include "platform/assert.h"
+#include "platform/globals.h"
#include "lib/invocation_mirror.h"
+#include "vm/allocation.h"
#include "vm/ast.h"
#include "vm/class_finalizer.h"
#include "vm/compiler_stats.h"
-#include "vm/scanner.h"
+#include "vm/object.h"
+#include "vm/raw_object.h"
+#include "vm/token.h"
namespace dart {
// Forward declarations.
class ArgumentsDescriptor;
-class Function;
class Isolate;
-class LiteralToken;
-class Script;
-class TokenStream;
+class LocalScope;
+class LocalVariable;
+class SourceLabel;
+template <typename T> class GrowableArray;
-struct TopLevel;
+struct CatchParamDesc;
class ClassDesc;
struct MemberDesc;
struct ParamList;
struct QualIdent;
-struct CatchParamDesc;
-struct FieldInitExpression;
+struct TopLevel;
// The class ParsedFunction holds the result of parsing a function.
class ParsedFunction : public ZoneAllocated {
@@ -506,9 +510,15 @@ class Parser : public ValueObject {
AstNode* ParseSwitchStatement(String* label_name);
// try/catch/finally parsing.
- void AddCatchParamsToScope(const CatchParamDesc& exception_param,
- const CatchParamDesc& stack_trace_param,
+ void AddCatchParamsToScope(CatchParamDesc* exception_param,
+ CatchParamDesc* stack_trace_param,
LocalScope* scope);
+ // Parse all the catch clause of a try.
+ SequenceNode* ParseCatchClauses(intptr_t handler_pos,
+ LocalVariable* exception_var,
+ LocalVariable* stack_trace_var,
+ const GrowableObjectArray& handler_types,
+ bool* needs_stack_trace);
// Parse finally block and create an AST for it.
SequenceNode* ParseFinallyBlock();
// Adds try block to the list of try blocks seen so far.
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698