@@ -884,7 +884,7 @@ var _js_helper;
884
884
toString ( ) {
885
885
if ( this [ _unmangledName ] != null )
886
886
return this [ _unmangledName ] ;
887
- let unmangledName = _js_names . unmangleAllIdentifiersIfPreservedAnyways ( this [ _typeName ] ) ;
887
+ let unmangledName = unmangleAllIdentifiersIfPreservedAnyways ( this [ _typeName ] ) ;
888
888
return this [ _unmangledName ] = unmangledName ;
889
889
}
890
890
get hashCode ( ) {
@@ -1334,6 +1334,14 @@ var _js_helper;
1334
1334
function isNotIdentical ( s , t ) {
1335
1335
return s !== t ;
1336
1336
}
1337
+ // Function unmangleGlobalNameIfPreservedAnyways: (String) → String
1338
+ function unmangleGlobalNameIfPreservedAnyways ( str ) {
1339
+ return str ;
1340
+ }
1341
+ // Function unmangleAllIdentifiersIfPreservedAnyways: (String) → String
1342
+ function unmangleAllIdentifiersIfPreservedAnyways ( str ) {
1343
+ return str ;
1344
+ }
1337
1345
class _Patch extends core . Object {
1338
1346
_Patch ( ) {
1339
1347
}
@@ -1807,19 +1815,16 @@ var _js_helper;
1807
1815
return result ;
1808
1816
}
1809
1817
static formatType ( className , typeArguments ) {
1810
- return _js_names . unmangleAllIdentifiersIfPreservedAnyways ( `${ className } ${ joinArguments ( typeArguments , 0 ) } ` ) ;
1818
+ return unmangleAllIdentifiersIfPreservedAnyways ( `${ className } ${ joinArguments ( typeArguments , 0 ) } ` ) ;
1811
1819
}
1812
1820
static objectTypeName ( object ) {
1813
- let name = constructorNameFallback ( _interceptors . getInterceptor ( object ) ) ;
1821
+ let name = Primitives . constructorNameFallback ( object ) ;
1814
1822
if ( name == 'Object' ) {
1815
1823
let decompiled = String ( object . constructor ) . match ( / ^ \s * f u n c t i o n \s * ( \S * ) \s * \( / ) [ 1 ] ;
1816
1824
if ( typeof decompiled == 'string' )
1817
1825
if ( / ^ \w + $ / . test ( decompiled ) )
1818
1826
name = dart . as ( decompiled , core . String ) ;
1819
1827
}
1820
- if ( dart . notNull ( name . length ) > 1 && dart . notNull ( core . identical ( name . codeUnitAt ( 0 ) , Primitives . DOLLAR_CHAR_VALUE ) ) ) {
1821
- name = name . substring ( 1 ) ;
1822
- }
1823
1828
return Primitives . formatType ( name , dart . as ( getRuntimeTypeInfo ( object ) , core . List ) ) ;
1824
1829
}
1825
1830
static objectToString ( object ) {
@@ -2123,6 +2128,22 @@ var _js_helper;
2123
2128
Primitives . DOLLAR_CHAR_VALUE = 36 ;
2124
2129
Primitives . timerFrequency = null ;
2125
2130
Primitives . timerTicks = null ;
2131
+ dart . defineLazyProperties ( Primitives , {
2132
+ get constructorNameFallback ( ) {
2133
+ return function getTagFallback ( o ) {
2134
+ var constructor = o . constructor ;
2135
+ if ( typeof constructor == "function" ) {
2136
+ var name = constructor . name ;
2137
+ if ( typeof name == "string" && name . length > 2 && name !== "Object" && name !== "Function.prototype" ) {
2138
+ return name ;
2139
+ }
2140
+ }
2141
+ var s = Object . prototype . toString . call ( o ) ;
2142
+ return s . substring ( 8 , s . length - 1 ) ;
2143
+ } ;
2144
+ } ,
2145
+ set constructorNameFallback ( _ ) { }
2146
+ } ) ;
2126
2147
class JsCache extends core . Object {
2127
2148
static allocate ( ) {
2128
2149
let result = Object . create ( null ) ;
@@ -3932,6 +3953,8 @@ var _js_helper;
3932
3953
exports . isJsObject = isJsObject ;
3933
3954
exports . isIdentical = isIdentical ;
3934
3955
exports . isNotIdentical = isNotIdentical ;
3956
+ exports . unmangleGlobalNameIfPreservedAnyways = unmangleGlobalNameIfPreservedAnyways ;
3957
+ exports . unmangleAllIdentifiersIfPreservedAnyways = unmangleAllIdentifiersIfPreservedAnyways ;
3935
3958
exports . patch = patch ;
3936
3959
exports . InternalMap = InternalMap ;
3937
3960
exports . requiresPreamble = requiresPreamble ;
0 commit comments