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

Unified Diff: tool/input_sdk/private/ddc_runtime/rtti.dart

Issue 2164763005: Library custom formatters (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Revert test files Created 4 years, 5 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/ddc_runtime/classes.dart ('k') | tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/ddc_runtime/rtti.dart
diff --git a/tool/input_sdk/private/ddc_runtime/rtti.dart b/tool/input_sdk/private/ddc_runtime/rtti.dart
index 7dd6fd4b39dcece8aaa472f4fce3bb8b702f5f5a..c6419a00ec5a6d978879a9d314713dd574d53a83 100644
--- a/tool/input_sdk/private/ddc_runtime/rtti.dart
+++ b/tool/input_sdk/private/ddc_runtime/rtti.dart
@@ -74,6 +74,7 @@ lazyFn(closure, computeType) {
// TODO(vsm): How should we encode the runtime type?
final _runtimeType = JS('', 'Symbol("_runtimeType")');
+final isNamedConstructor = JS('', 'Symbol("isNamedConstructor")');
_checkPrimitiveType(obj) {
// TODO(jmesserly): JS is used to prevent type literal wrapping. Is there a
@@ -114,7 +115,7 @@ getFunctionType(obj) {
return definiteFunctionType(bottom, args, JS('', 'void 0'));
}
-/// Returns an the runtime representation of the type of obj.
+/// Returns the runtime representation of the type of obj.
///
/// The resulting object is used internally for runtime type checking. This is
/// different from the user-visible Type object returned by calling
@@ -164,6 +165,10 @@ wrapType(type) {
unwrapType(obj) => obj._wrappedType;
_getRuntimeType(value) => JS('', '#[#]', value, _runtimeType);
+getIsNamedConstructor(value) => JS('', '#[#]', value, isNamedConstructor);
+// TODO(bmilligan): Define the symbol in rtti.dart instead of dart_library.js
+// and get rid of the call to dart_library in the JS here.
+getDartLibraryName(value) => JS('', '#[dart_library.dartLibraryName]', value);
/// Tag the runtime type of [value] to be type [t].
void tag(value, t) {
« no previous file with comments | « tool/input_sdk/private/ddc_runtime/classes.dart ('k') | tool/input_sdk/private/ddc_runtime/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698