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

Side by Side Diff: pkg/compiler/lib/src/resolution/semantic_visitor.dart

Issue 1325843003: Add optional message to assert in Dart2js. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Reintroduce assertHelper for asserts without messages. Created 5 years, 3 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.semantics_visitor; 5 library dart2js.semantics_visitor;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../dart_types.dart'; 8 import '../dart_types.dart';
9 import '../diagnostics/spannable.dart' show 9 import '../diagnostics/spannable.dart' show
10 Spannable, 10 Spannable,
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 /// For instance: 1290 /// For instance:
1291 /// 1291 ///
1292 /// m() { dynamic = rhs; } 1292 /// m() { dynamic = rhs; }
1293 /// 1293 ///
1294 R visitDynamicTypeLiteralSet( 1294 R visitDynamicTypeLiteralSet(
1295 SendSet node, 1295 SendSet node,
1296 ConstantExpression constant, 1296 ConstantExpression constant,
1297 Node rhs, 1297 Node rhs,
1298 A arg); 1298 A arg);
1299 1299
1300 /// Call to `assert` with [expression] as the condition.
1301 ///
1302 /// For instance:
1303 ///
1304 /// m() { assert(expression); }
1305 ///
1306 R visitAssert(
1307 Send node,
1308 Node expression,
1309 A arg);
1310
1311 /// Call to `assert` with the wrong number of [arguments].
1312 ///
1313 /// For instance:
1314 ///
1315 /// m() { assert(); }
1316 ///
1317 /// or
1318 ///
1319 /// m() { assert(expression1, expression2); }
1320 ///
1321 R errorInvalidAssert(
1322 Send node,
1323 NodeList arguments,
1324 A arg);
1325
1326 /// Binary expression `left operator right` where [operator] is a user 1300 /// Binary expression `left operator right` where [operator] is a user
1327 /// definable operator. Binary expressions using operator `==` are handled 1301 /// definable operator. Binary expressions using operator `==` are handled
1328 /// by [visitEquals] and index operations `a[b]` are handled by [visitIndex]. 1302 /// by [visitEquals] and index operations `a[b]` are handled by [visitIndex].
1329 /// 1303 ///
1330 /// For instance: 1304 /// For instance:
1331 /// 1305 ///
1332 /// add(a, b) => a + b; 1306 /// add(a, b) => a + b;
1333 /// sub(a, b) => a - b; 1307 /// sub(a, b) => a - b;
1334 /// mul(a, b) => a * b; 1308 /// mul(a, b) => a * b;
1335 /// 1309 ///
(...skipping 4509 matching lines...) Expand 10 before | Expand all | Expand 10 after
5845 /// C() : this._(42); 5819 /// C() : this._(42);
5846 /// } 5820 /// }
5847 /// 5821 ///
5848 R errorUnresolvedThisConstructorInvoke( 5822 R errorUnresolvedThisConstructorInvoke(
5849 Send node, 5823 Send node,
5850 Element element, 5824 Element element,
5851 NodeList arguments, 5825 NodeList arguments,
5852 Selector selector, 5826 Selector selector,
5853 A arg); 5827 A arg);
5854 } 5828 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698