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

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

Issue 8569013: Do not allow allocation of FallThroughError and AssertionError by the user. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/error.dart ('k') | tests/co19/co19-runtime.status » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #include "vm/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 12 matching lines...) Expand all
23 23
24 DEFINE_FLAG(bool, enable_asserts, false, "Enable assert statements."); 24 DEFINE_FLAG(bool, enable_asserts, false, "Enable assert statements.");
25 DEFINE_FLAG(bool, enable_type_checks, false, "Enable type checks."); 25 DEFINE_FLAG(bool, enable_type_checks, false, "Enable type checks.");
26 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations."); 26 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
27 DEFINE_FLAG(bool, warning_as_error, false, "Treat warnings as errors."); 27 DEFINE_FLAG(bool, warning_as_error, false, "Treat warnings as errors.");
28 DEFINE_FLAG(bool, silent_warnings, false, "Silence warnings."); 28 DEFINE_FLAG(bool, silent_warnings, false, "Silence warnings.");
29 29
30 // All references to Dart names are listed here. 30 // All references to Dart names are listed here.
31 static const char* kAssertionErrorName = "AssertionError"; 31 static const char* kAssertionErrorName = "AssertionError";
32 static const char* kFallThroughErrorName = "FallThroughError"; 32 static const char* kFallThroughErrorName = "FallThroughError";
33 static const char* kThrowNewName = "throwNew"; 33 static const char* kThrowNewName = "_throwNew";
34 static const char* kGrowableObjectArrayFromArrayName = 34 static const char* kGrowableObjectArrayFromArrayName =
35 "GrowableObjectArray._usingArray"; 35 "GrowableObjectArray._usingArray";
36 static const char* kGrowableObjectArrayName = "GrowableObjectArray"; 36 static const char* kGrowableObjectArrayName = "GrowableObjectArray";
37 static const char* kMutableMapName = "MutableMap"; 37 static const char* kMutableMapName = "MutableMap";
38 static const char* kMutableMapFromLiteralName = "fromLiteral"; 38 static const char* kMutableMapFromLiteralName = "fromLiteral";
39 static const char* kImmutableMapName = "ImmutableMap"; 39 static const char* kImmutableMapName = "ImmutableMap";
40 static const char* kImmutableMapConstructorName = "ImmutableMap."; 40 static const char* kImmutableMapConstructorName = "ImmutableMap.";
41 static const char* kStringClassName = "StringBase"; 41 static const char* kStringClassName = "StringBase";
42 static const char* kInterpolateName = "_interpolate"; 42 static const char* kInterpolateName = "_interpolate";
43 static const char* kThisName = "this"; 43 static const char* kThisName = "this";
(...skipping 7332 matching lines...) Expand 10 before | Expand all | Expand 10 after
7376 } 7376 }
7377 7377
7378 7378
7379 void Parser::SkipNestedExpr() { 7379 void Parser::SkipNestedExpr() {
7380 const bool saved_mode = SetAllowFunctionLiterals(true); 7380 const bool saved_mode = SetAllowFunctionLiterals(true);
7381 SkipExpr(); 7381 SkipExpr();
7382 SetAllowFunctionLiterals(saved_mode); 7382 SetAllowFunctionLiterals(saved_mode);
7383 } 7383 }
7384 7384
7385 } // namespace dart 7385 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/error.dart ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698