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

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

Issue 2568313002: Implement messages in assert() in dev_compiler. (Closed)
Patch Set: Format. 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 side-by-side diff with in-line comments
Download patch
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index 0e3acaf539e93fd4692da3833e2ab2b24491be9b..cefbefb19e5030b55c82852aaa82e14b3f1bef80 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -312,7 +312,8 @@ dsend(obj, method, @rest args) => _callMethod(obj, method, null, args, method);
dgsend(obj, typeArgs, method, @rest args) =>
_callMethod(obj, method, typeArgs, args, method);
-dindex(obj, index) => _callMethod(obj, '_get', null, JS('', '[#]', index), '[]');
+dindex(obj, index) =>
+ _callMethod(obj, '_get', null, JS('', '[#]', index), '[]');
dsetindex(obj, index, value) =>
_callMethod(obj, '_set', null, JS('', '[#, #]', index, value), '[]=');
@@ -546,10 +547,10 @@ map(values, [K, V]) => JS(
})()''');
@JSExportName('assert')
-assert_(condition) => JS(
+assert_(condition, [message]) => JS(
'',
'''(() => {
- if (!$condition) $throwAssertionError();
+ if (!$condition) $throwAssertionError(message);
})()''');
var _stack = null;

Powered by Google App Engine
This is Rietveld 408576698