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

Unified Diff: pkg/dev_compiler/lib/js/common/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 2353133004: fix #27403, use AST summaries in DDC (Closed)
Patch Set: merge Created 4 years, 3 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:
Download patch
« no previous file with comments | « pkg/dev_compiler/lib/js/amd/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/es6/dart_sdk.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
index 1b39b697b1cb5d79f66dd7fcabf796d40cf6624e..55d4f60ef834924cd6ef26a2ec5a14ff1699b85f 100644
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
@@ -662,6 +662,7 @@
let IterableAndListTovoid = () => (IterableAndListTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [core.Iterable, core.List])))();
let _SplayTreeMapNodeTobool = () => (_SplayTreeMapNodeTobool = dart.constFn(dart.definiteFunctionType(core.bool, [collection._SplayTreeMapNode])))();
let dynamicAndFnTodynamic = () => (dynamicAndFnTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dynamicAnddynamicTodynamic()])))();
+ let StringBufferToString = () => (StringBufferToString = dart.constFn(dart.definiteFunctionType(core.String, [core.StringBuffer])))();
let Uint8ListAndintAndintTovoid$ = () => (Uint8ListAndintAndintTovoid$ = dart.constFn(dart.definiteFunctionType(dart.void, [typed_data.Uint8List, core.int, core.int])))();
let StringAndFnTodynamic = () => (StringAndFnTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.String, dynamicAnddynamicTodynamic()])))();
let EventSinkOfStringTo_LineSplitterEventSink = () => (EventSinkOfStringTo_LineSplitterEventSink = dart.constFn(dart.definiteFunctionType(convert._LineSplitterEventSink, [EventSinkOfString()])))();
@@ -8690,7 +8691,7 @@
})(_isolate_helper._Manager._serializePrintMessage);
}
static _serializePrintMessage(object) {
- return _isolate_helper._serializeMessage(dart.map({command: "print", msg: object}, core.String, dart.dynamic));
+ return _isolate_helper._serializeMessage(dart.map({command: "print", msg: core.String._check(object)}, core.String, core.String));
}
maybeCloseWorker() {
if (dart.test(this.isWorker) && dart.test(this.isolates[dartx.isEmpty]) && this.topEventLoop[_activeJsAsyncCount] == 0) {
@@ -9249,7 +9250,7 @@
case 'print':
{
if (dart.test(_isolate_helper._globalState.isWorker)) {
- _isolate_helper._globalState.mainManager.postMessage(_isolate_helper._serializeMessage(dart.map({command: 'print', msg: msg}, core.String, dart.dynamic)));
+ _isolate_helper._globalState.mainManager.postMessage(_isolate_helper._serializeMessage(dart.map({command: 'print', msg: core.String._check(msg)}, core.String, core.String)));
} else {
core.print(dart.dindex(msg, 'msg'));
}
@@ -9271,7 +9272,7 @@
}
static _log(msg) {
if (dart.test(_isolate_helper._globalState.isWorker)) {
- _isolate_helper._globalState.mainManager.postMessage(_isolate_helper._serializeMessage(dart.map({command: 'log', msg: msg}, core.String, dart.dynamic)));
+ _isolate_helper._globalState.mainManager.postMessage(_isolate_helper._serializeMessage(dart.map({command: 'log', msg: core.String._check(msg)}, core.String, core.String)));
} else {
try {
_isolate_helper.IsolateNatives._consoleLog(msg);
@@ -10667,7 +10668,7 @@
let fieldsExtractor = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.CLASS_FIELDS_EXTRACTOR);
let classId = classExtractor(x);
let fields = fieldsExtractor(x);
- return ['dart', classId, this.serializeArrayInPlace(_interceptors.JSArray._check(fields))];
+ return JSArrayOfString().of(['dart', classId, core.String._check(this.serializeArrayInPlace(_interceptors.JSArray._check(fields)))]);
}
};
dart.setSignature(_isolate_helper._Serializer, {
@@ -28897,10 +28898,10 @@
super.new();
}
decodeStream(byteStream) {
- return byteStream.transform(core.String)(this.decoder).fold(dart.dynamic)(new core.StringBuffer(), dart.fn((buffer, string) => ((() => {
+ return byteStream.transform(core.String)(this.decoder).fold(core.StringBuffer)(new core.StringBuffer(), dart.fn((buffer, string) => ((() => {
dart.dsend(buffer, 'write', string);
return buffer;
- })()), dynamicAndStringTodynamic())).then(core.String)(dart.fn(buffer => dart.toString(buffer), dynamicToString()));
+ })()), dynamicAndStringTodynamic())).then(core.String)(dart.fn(buffer => dart.toString(buffer), StringBufferToString()));
}
static getByName(name) {
if (name == null) return null;
@@ -28962,11 +28963,12 @@
const _subsetMask = Symbol('_subsetMask');
convert.Converter$ = dart.generic((S, T) => {
let StreamOfS = () => (StreamOfS = dart.constFn(async.Stream$(S)))();
- let _ConverterStreamEventSinkOfS$dynamic = () => (_ConverterStreamEventSinkOfS$dynamic = dart.constFn(convert._ConverterStreamEventSink$(S, dart.dynamic)))();
+ let _ConverterStreamEventSinkOfS$T = () => (_ConverterStreamEventSinkOfS$T = dart.constFn(convert._ConverterStreamEventSink$(S, T)))();
let StreamTransformerOfS$T = () => (StreamTransformerOfS$T = dart.constFn(async.StreamTransformer$(S, T)))();
let SinkOfT = () => (SinkOfT = dart.constFn(core.Sink$(T)))();
let StreamOfT = () => (StreamOfT = dart.constFn(async.Stream$(T)))();
- let EventSinkTo_ConverterStreamEventSinkOfS$dynamic = () => (EventSinkTo_ConverterStreamEventSinkOfS$dynamic = dart.constFn(dart.definiteFunctionType(_ConverterStreamEventSinkOfS$dynamic(), [async.EventSink])))();
+ let EventSinkOfT = () => (EventSinkOfT = dart.constFn(async.EventSink$(T)))();
+ let EventSinkTo_ConverterStreamEventSinkOfS$T = () => (EventSinkTo_ConverterStreamEventSinkOfS$T = dart.constFn(dart.definiteFunctionType(_ConverterStreamEventSinkOfS$T(), [async.EventSink])))();
class Converter extends core.Object {
new() {
}
@@ -28982,7 +28984,7 @@
}
bind(stream) {
StreamOfS()._check(stream);
- return StreamOfT().eventTransformed(stream, dart.fn(sink => new (_ConverterStreamEventSinkOfS$dynamic())(this, sink), EventSinkTo_ConverterStreamEventSinkOfS$dynamic()));
+ return StreamOfT().eventTransformed(stream, dart.fn(sink => new (_ConverterStreamEventSinkOfS$T())(this, EventSinkOfT()._check(sink)), EventSinkTo_ConverterStreamEventSinkOfS$T()));
}
}
dart.addTypeTests(Converter);
« no previous file with comments | « pkg/dev_compiler/lib/js/amd/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/es6/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698