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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart

Issue 3003613002: improve DDC's type checks (Closed)
Patch Set: format Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
index 14f89cf55ef8da5fe9efde43a77272f1f50dbff0..3762f8b4fc4a0eca9c7a1aeaf25153e4f34fb683 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
@@ -21,34 +21,6 @@ void ignoreAllErrors(bool flag) {
JS('', 'dart.__ignoreAllErrors = #', flag);
}
-throwCastError(object, actual, type) {
- var found = typeName(actual);
- var expected = typeName(type);
- if (JS('bool', 'dart.__trapRuntimeErrors')) JS('', 'debugger');
- throw new CastErrorImplementation(object, found, expected);
-}
-
-throwTypeError(object, actual, type) {
- var found = typeName(actual);
- var expected = typeName(type);
- if (JS('bool', 'dart.__trapRuntimeErrors')) JS('', 'debugger');
- throw new TypeErrorImplementation(object, found, expected);
-}
-
-throwStrongModeCastError(object, actual, type) {
- var found = typeName(actual);
- var expected = typeName(type);
- if (JS('bool', 'dart.__trapRuntimeErrors')) JS('', 'debugger');
- throw new StrongModeCastError(object, found, expected);
-}
-
-throwStrongModeTypeError(object, actual, type) {
- var found = typeName(actual);
- var expected = typeName(type);
- if (JS('bool', 'dart.__trapRuntimeErrors')) JS('', 'debugger');
- throw new StrongModeTypeError(object, found, expected);
-}
-
throwUnimplementedError(String message) {
if (JS('bool', 'dart.__trapRuntimeErrors')) JS('', 'debugger');
throw new UnimplementedError(message);

Powered by Google App Engine
This is Rietveld 408576698