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

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 2699073003: Support `void` as generic argument.
Patch Set: Shuffle things around to have a better `voidRti` locality. Created 3 years, 7 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 | « pkg/front_end/lib/src/scanner/token.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index fc1987ad7e412cd56933c16459bf4cf28ffb2bd6..cc0d415c389fa10977b950ceec5144a7cae7dbbe 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -183,6 +183,14 @@ bool isNullTypeRti(type) {
JS_GET_NAME(JsGetName.NULL_CLASS_TYPE_NAME));
}
+/// Returns whether the given type is void type.
+// TODO(floitsch): move this to foreign_helper.dart or similar.
+@ForceInline()
+bool isVoidType(rti) {
+ return JS_BUILTIN(
+ 'returns:bool;effects:none;depends:none', JsBuiltin.isVoidRti, rti);
+}
+
/// Returns the metadata of the given [index].
// TODO(floitsch): move this to foreign_helper.dart or similar.
@ForceInline()
« no previous file with comments | « pkg/front_end/lib/src/scanner/token.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698