@@ -946,6 +946,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
946
946
dart.throwStrongModeTypeError = function(object, actual, type) {
947
947
dart.throw(new _js_helper.StrongModeTypeError(object, dart.typeName(actual), dart.typeName(type)));
948
948
};
949
+ dart.throwUnimplementedError = function(message) {
950
+ dart.throw(new core.UnimplementedError(message));
951
+ };
949
952
dart.throwAssertionError = function() {
950
953
dart.throw(new core.AssertionError());
951
954
};
@@ -1564,6 +1567,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
1564
1567
if (ft2 === core.Function) {
1565
1568
return true;
1566
1569
}
1570
+ if (ft1 === core.Function) {
1571
+ return false;
1572
+ }
1567
1573
let ret1 = ft1.returnType;
1568
1574
let ret2 = ft2.returnType;
1569
1575
let args1 = ft1.args;
@@ -2251,7 +2257,25 @@ dart_library.library('dart_sdk', null, /* Imports */[
2251
2257
dart._typeFormalCount = Symbol("_typeFormalCount");
2252
2258
dart.isSubtype = dart._subtypeMemo((t1, t2) => t1 === t2 || dart._isSubtype(t1, t2, true));
2253
2259
dart.hasOwnProperty = Object.prototype.hasOwnProperty;
2254
- _debugger.skipDartConfig = dart.const(new core.Object());
2260
+ _debugger.JsonMLConfig = class JsonMLConfig extends core.Object {
2261
+ new(name) {
2262
+ this.name = name;
2263
+ }
2264
+ };
2265
+ dart.setSignature(_debugger.JsonMLConfig, {
2266
+ constructors: () => ({new: dart.definiteFunctionType(_debugger.JsonMLConfig, [core.String])})
2267
+ });
2268
+ dart.defineLazy(_debugger.JsonMLConfig, {
2269
+ get none() {
2270
+ return dart.const(new _debugger.JsonMLConfig("none"));
2271
+ },
2272
+ get skipDart() {
2273
+ return dart.const(new _debugger.JsonMLConfig("skipDart"));
2274
+ },
2275
+ get keyToString() {
2276
+ return dart.const(new _debugger.JsonMLConfig("keyToString"));
2277
+ }
2278
+ });
2255
2279
_debugger.maxIterableChildrenToDisplay = 50;
2256
2280
dart.defineLazy(_debugger, {
2257
2281
get _devtoolsFormatter() {
@@ -2334,10 +2358,10 @@ dart_library.library('dart_sdk', null, /* Imports */[
2334
2358
new(opts) {
2335
2359
let name = opts && 'name' in opts ? opts.name : null;
2336
2360
let value = opts && 'value' in opts ? opts.value : null;
2337
- let skipDart = opts && 'skipDart ' in opts ? opts.skipDart : null ;
2361
+ let config = opts && 'config ' in opts ? opts.config : _debugger.JsonMLConfig.none ;
2338
2362
this.name = name;
2339
2363
this.value = value;
2340
- this.skipDart = skipDart == true ;
2364
+ this.config = config ;
2341
2365
}
2342
2366
['=='](other) {
2343
2367
return _debugger.NameValuePair.is(other) && other.name == this.name;
@@ -2347,7 +2371,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2347
2371
}
2348
2372
};
2349
2373
dart.setSignature(_debugger.NameValuePair, {
2350
- constructors: () => ({new: dart.definiteFunctionType(_debugger.NameValuePair, [], {name: core.String, value: core.Object, skipDart: core.bool })})
2374
+ constructors: () => ({new: dart.definiteFunctionType(_debugger.NameValuePair, [], {name: core.String, value: core.Object, config: _debugger.JsonMLConfig })})
2351
2375
});
2352
2376
_debugger.MapEntry = class MapEntry extends core.Object {
2353
2377
new(opts) {
@@ -2358,7 +2382,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2358
2382
}
2359
2383
};
2360
2384
dart.setSignature(_debugger.MapEntry, {
2361
- constructors: () => ({new: dart.definiteFunctionType(_debugger.MapEntry, [], {key: core.String , value: core.Object})})
2385
+ constructors: () => ({new: dart.definiteFunctionType(_debugger.MapEntry, [], {key: core.Object , value: core.Object})})
2362
2386
});
2363
2387
_debugger.ClassMetadata = class ClassMetadata extends core.Object {
2364
2388
new(object) {
@@ -2445,11 +2469,14 @@ dart_library.library('dart_sdk', null, /* Imports */[
2445
2469
this[_simpleFormatter] = simpleFormatter;
2446
2470
}
2447
2471
header(object, config) {
2448
- if (core.identical (config, _debugger.skipDartConfig ) || dart.test(_debugger.isNativeJavaScriptObject(object))) {
2472
+ if (dart.equals (config, _debugger.JsonMLConfig.skipDart ) || dart.test(_debugger.isNativeJavaScriptObject(object))) {
2449
2473
return null;
2450
2474
}
2451
2475
let c = this[_simpleFormatter].preview(object);
2452
2476
if (c == null) return null;
2477
+ if (dart.equals(config, _debugger.JsonMLConfig.keyToString)) {
2478
+ c = dart.toString(object);
2479
+ }
2453
2480
let element = new _debugger.JsonMLElement('span');
2454
2481
element.setStyle('background-color: #d9edf7');
2455
2482
element.createTextChild(c);
@@ -2471,9 +2498,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2471
2498
nameSpan.addStyle("padding-left: 13px;");
2472
2499
li.appendChild(nameSpan);
2473
2500
let objectTag = li.createObjectTag(child.value);
2474
- if (dart.test(child.skipDart)) {
2475
- objectTag.addAttribute('config', _debugger.skipDartConfig);
2476
- }
2501
+ objectTag.addAttribute('config', child.config);
2477
2502
if (!dart.test(this[_simpleFormatter].hasChildren(child.value))) {
2478
2503
li.setStyle("padding-left: 13px;");
2479
2504
}
@@ -2650,7 +2675,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2650
2675
return core.String._check(dart.typeName(dart.getReifiedType(object)));
2651
2676
}
2652
2677
children(object) {
2653
- return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'signature', value: this.preview(object)}), new _debugger.NameValuePair({name: 'JavaScript Function', value: object, skipDart: true })]);
2678
+ return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'signature', value: this.preview(object)}), new _debugger.NameValuePair({name: 'JavaScript Function', value: object, config: _debugger.JsonMLConfig.skipDart })]);
2654
2679
}
2655
2680
};
2656
2681
dart.setSignature(_debugger.FunctionFormatter, {
@@ -2676,7 +2701,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2676
2701
let map = core.Map._check(object);
2677
2702
let entries = LinkedHashSetOfNameValuePair().new();
2678
2703
map[dartx.forEach](dart.fn((key, value) => {
2679
- let entryWrapper = new _debugger.MapEntry({key: core.String._check( key) , value: value});
2704
+ let entryWrapper = new _debugger.MapEntry({key: key, value: value});
2680
2705
entries.add(new _debugger.NameValuePair({name: dart.toString(entries.length), value: entryWrapper}));
2681
2706
}, dynamicAnddynamicTovoid()));
2682
2707
this.addMetadataChildren(object, entries);
@@ -2744,9 +2769,9 @@ dart_library.library('dart_sdk', null, /* Imports */[
2744
2769
if (mixins != null && dart.test(dart.dload(mixins, 'isNotEmpty'))) {
2745
2770
ret[dartx.add](new _debugger.NameValuePair({name: '[[Mixins]]', value: new _debugger.HeritageClause('mixins', core.List._check(mixins))}));
2746
2771
}
2747
- ret[dartx.add](new _debugger.NameValuePair({name: '[[JavaScript View]]', value: entry.object, skipDart: true }));
2772
+ ret[dartx.add](new _debugger.NameValuePair({name: '[[JavaScript View]]', value: entry.object, config: _debugger.JsonMLConfig.skipDart }));
2748
2773
if (!core.Type.is(entry.object)) {
2749
- ret[dartx.add](new _debugger.NameValuePair({name: '[[JavaScript Constructor]]', value: _debugger.JSNative.getProperty(entry.object, 'constructor'), skipDart: true }));
2774
+ ret[dartx.add](new _debugger.NameValuePair({name: '[[JavaScript Constructor]]', value: _debugger.JSNative.getProperty(entry.object, 'constructor'), config: _debugger.JsonMLConfig.skipDart }));
2750
2775
}
2751
2776
return ret;
2752
2777
}
@@ -2773,7 +2798,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2773
2798
return true;
2774
2799
}
2775
2800
children(object) {
2776
- return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'key', value: dart.dload(object, 'key')}), new _debugger.NameValuePair({name: 'value', value: dart.dload(object, 'value')})]);
2801
+ return JSArrayOfNameValuePair().of([new _debugger.NameValuePair({name: 'key', value: dart.dload(object, 'key'), config: _debugger.JsonMLConfig.keyToString }), new _debugger.NameValuePair({name: 'value', value: dart.dload(object, 'value')})]);
2777
2802
}
2778
2803
};
2779
2804
_debugger.MapEntryFormatter[dart.implements] = () => [_debugger.Formatter];
0 commit comments