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

Side by Side Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 2576113002: fix assert with message (Closed)
Patch Set: remove --assert-message flag Created 4 years 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 | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/language/language_dart2js.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 _js_helper; 5 library _js_helper;
6 6
7 import 'dart:_js_embedded_names' show 7 import 'dart:_js_embedded_names' show
8 DEFERRED_LIBRARY_URIS, 8 DEFERRED_LIBRARY_URIS,
9 DEFERRED_LIBRARY_HASHES, 9 DEFERRED_LIBRARY_HASHES,
10 GET_TYPE_FROM_NAME, 10 GET_TYPE_FROM_NAME,
(...skipping 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after
4042 4042
4043 void badMain() { 4043 void badMain() {
4044 throw new MainError("'main' is not a function."); 4044 throw new MainError("'main' is not a function.");
4045 } 4045 }
4046 4046
4047 void mainHasTooManyParameters() { 4047 void mainHasTooManyParameters() {
4048 throw new MainError("'main' expects too many parameters."); 4048 throw new MainError("'main' expects too many parameters.");
4049 } 4049 }
4050 4050
4051 class _AssertionError extends AssertionError { 4051 class _AssertionError extends AssertionError {
4052 final _message; 4052 _AssertionError(Object message) : super(message);
4053 _AssertionError(this._message);
4054 4053
4055 String toString() => "Assertion failed: " + Error.safeToString(_message); 4054 String toString() => "Assertion failed: " + Error.safeToString(message);
4056 } 4055 }
4057 4056
4058 4057
4059 // [_UnreachableError] is a separate class because we always resolve 4058 // [_UnreachableError] is a separate class because we always resolve
4060 // [assertUnreachable] and want to reduce the impact of resolving possibly 4059 // [assertUnreachable] and want to reduce the impact of resolving possibly
4061 // unneeded code. 4060 // unneeded code.
4062 class _UnreachableError extends AssertionError { 4061 class _UnreachableError extends AssertionError {
4063 _UnreachableError(); 4062 _UnreachableError();
4064 String toString() => "Assertion failed: Reached dead code"; 4063 String toString() => "Assertion failed: Reached dead code";
4065 } 4064 }
4066 4065
4067 @NoInline() 4066 @NoInline()
4068 void assertUnreachable() { 4067 void assertUnreachable() {
4069 throw new _UnreachableError(); 4068 throw new _UnreachableError();
4070 } 4069 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698