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

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

Issue 2703263002: Custom formatter cleanup Fix case where displaying a class constructor generated unreadable huge ou… (Closed)
Patch Set: Created 3 years, 10 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/rtti.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
index 344c592fcd546a3ab4a87e9176c17d80cf61456d..52c3991c4f00bebcfc351a396354fa59c8ad849f 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
@@ -74,6 +74,8 @@ lazyFn(closure, computeType) {
final _runtimeType = JS('', 'Symbol("_runtimeType")');
final isNamedConstructor = JS('', 'Symbol("isNamedConstructor")');
+final dartLibraryName = JS('', 'Symbol("dartLibraryName")');
+
_checkPrimitiveType(obj) {
// TODO(jmesserly): JS is used to prevent type literal wrapping. Is there a
// better way we can handle this? (sra: It is super dodgy that the values
@@ -187,9 +189,7 @@ unwrapType(WrappedType 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);
+getDartLibraryName(value) => JS('', '#[#]', value, dartLibraryName);
/// Tag the runtime type of [value] to be type [t].
void tag(value, t) {

Powered by Google App Engine
This is Rietveld 408576698