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

Unified Diff: tool/input_sdk/private/utils.dart

Issue 1580413002: Add a `@JSExportName` annotation for internal use in the runtime (use it to export dart.assert inst… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: made _emitTopLevelName.suffix a named arg Created 4 years, 11 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
« no previous file with comments | « tool/input_sdk/private/foreign_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/utils.dart
diff --git a/tool/input_sdk/private/utils.dart b/tool/input_sdk/private/utils.dart
index 0fa80f2bc62630331b28ed75600638141e076453..512fe49e84bbd80853465ea8ffbb0add206e67ba 100644
--- a/tool/input_sdk/private/utils.dart
+++ b/tool/input_sdk/private/utils.dart
@@ -4,7 +4,7 @@
library dart._utils;
-import 'dart:_foreign_helper' show JS;
+import 'dart:_foreign_helper' show JS, JSExportName;
/// This library defines a set of general javascript utilities for us
/// by the Dart runtime.
@@ -39,6 +39,7 @@ void throwInternalError(String message) => JS('', '''(() => {
// TODO(ochafik): Re-introduce a @JS annotation in the SDK (same as package:js)
// so that this is named 'assert' in JavaScript.
+@JSExportName('assert')
void assert_(bool condition) => JS('', '''(() => {
if (!condition) throwInternalError("The compiler is broken: failed assert");
})()''');
« no previous file with comments | « tool/input_sdk/private/foreign_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698