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

Unified Diff: lib/runtime/dart/convert.js

Issue 1144303003: Use signature inheritance when method types are unchanged (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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: lib/runtime/dart/convert.js
diff --git a/lib/runtime/dart/convert.js b/lib/runtime/dart/convert.js
index 2002be1eddaccdc82d9393b7f952cf67986abf3c..91fcb224226047b66af0364a52cea59a879e8eec 100644
--- a/lib/runtime/dart/convert.js
+++ b/lib/runtime/dart/convert.js
@@ -360,8 +360,7 @@ var collection = dart.import(collection);
dart.setSignature(_ErrorHandlingAsciiDecoderSink, {
methods: () => ({
close: dart.functionType(dart.void, []),
- add: dart.functionType(dart.void, [core.List$(core.int)]),
- addSlice: dart.functionType(dart.void, [core.List$(core.int), core.int, core.int, core.bool])
+ add: dart.functionType(dart.void, [core.List$(core.int)])
})
});
class _SimpleAsciiDecoderSink extends ByteConversionSinkBase {
@@ -395,8 +394,7 @@ var collection = dart.import(collection);
dart.setSignature(_SimpleAsciiDecoderSink, {
methods: () => ({
close: dart.functionType(dart.void, []),
- add: dart.functionType(dart.void, [core.List$(core.int)]),
- addSlice: dart.functionType(dart.void, [core.List$(core.int), core.int, core.int, core.bool])
+ add: dart.functionType(dart.void, [core.List$(core.int)])
})
});
class _ByteAdapterSink extends ByteConversionSinkBase {
@@ -632,9 +630,7 @@ var collection = dart.import(collection);
}
}
dart.defineNamedConstructor(HtmlEscapeMode, '_');
- dart.setSignature(HtmlEscapeMode, {
- methods: () => ({toString: dart.functionType(core.String, [])})
- });
+ dart.setSignature(HtmlEscapeMode, {});
HtmlEscapeMode.UNKNOWN = dart.const(new HtmlEscapeMode._('unknown', true, true, true, true));
let _convert = Symbol('_convert');
class HtmlEscape extends Converter$(core.String, core.String) {
@@ -763,9 +759,7 @@ var collection = dart.import(collection);
}
}
}
- dart.setSignature(JsonUnsupportedObjectError, {
- methods: () => ({toString: dart.functionType(core.String, [])})
- });
+ dart.setSignature(JsonUnsupportedObjectError, {});
class JsonCyclicError extends JsonUnsupportedObjectError {
JsonCyclicError(object) {
super.JsonUnsupportedObjectError(object);
@@ -774,9 +768,7 @@ var collection = dart.import(collection);
return "Cyclic error in JSON stringify";
}
}
- dart.setSignature(JsonCyclicError, {
- methods: () => ({toString: dart.functionType(core.String, [])})
- });
+ dart.setSignature(JsonCyclicError, {});
let _reviver = Symbol('_reviver');
let _toEncodable$ = Symbol('_toEncodable');
class JsonCodec extends Codec$(core.Object, core.String) {
@@ -1603,8 +1595,7 @@ var collection = dart.import(collection);
methods: () => ({
close: dart.functionType(dart.void, []),
add: dart.functionType(dart.void, [core.List$(core.int)]),
- [_addSliceToSink]: dart.functionType(dart.void, [core.List$(core.int), core.int, core.int, core.bool]),
- addSlice: dart.functionType(dart.void, [core.List$(core.int), core.int, core.int, core.bool])
+ [_addSliceToSink]: dart.functionType(dart.void, [core.List$(core.int), core.int, core.int, core.bool])
})
});
class _Latin1AllowInvalidDecoderSink extends _Latin1DecoderSink {
@@ -1630,9 +1621,7 @@ var collection = dart.import(collection);
}
}
}
- dart.setSignature(_Latin1AllowInvalidDecoderSink, {
- methods: () => ({addSlice: dart.functionType(dart.void, [core.List$(core.int), core.int, core.int, core.bool])})
- });
+ dart.setSignature(_Latin1AllowInvalidDecoderSink, {});
class LineSplitter extends Converter$(core.String, core.List$(core.String)) {
LineSplitter() {
super.Converter();
@@ -1878,10 +1867,7 @@ var collection = dart.import(collection);
dart.setSignature(_StringSinkConversionSink, {
methods: () => ({
close: dart.functionType(dart.void, []),
- addSlice: dart.functionType(dart.void, [core.String, core.int, core.int, core.bool]),
- add: dart.functionType(dart.void, [core.String]),
- asUtf8Sink: dart.functionType(ByteConversionSink, [core.bool]),
- asStringSink: dart.functionType(ClosableStringSink, [])
+ addSlice: dart.functionType(dart.void, [core.String, core.int, core.int, core.bool])
})
});
class _StringCallbackSink extends _StringSinkConversionSink {
@@ -1899,12 +1885,7 @@ var collection = dart.import(collection);
return new _Utf8StringSinkAdapter(this, this[_stringSink], allowMalformed);
}
}
- dart.setSignature(_StringCallbackSink, {
- methods: () => ({
- close: dart.functionType(dart.void, []),
- asUtf8Sink: dart.functionType(ByteConversionSink, [core.bool])
- })
- });
+ dart.setSignature(_StringCallbackSink, {});
class _StringAdapterSink extends StringConversionSinkBase {
_StringAdapterSink(sink) {
this[_sink] = sink;
@@ -1927,7 +1908,6 @@ var collection = dart.import(collection);
}
dart.setSignature(_StringAdapterSink, {
methods: () => ({
- add: dart.functionType(dart.void, [core.String]),
addSlice: dart.functionType(dart.void, [core.String, core.int, core.int, core.bool]),
close: dart.functionType(dart.void, [])
})
@@ -2732,7 +2712,6 @@ var collection = dart.import(collection);
remove: dart.functionType(dart.dynamic, [core.Object]),
clear: dart.functionType(dart.void, []),
forEach: dart.functionType(dart.void, [dart.functionType(dart.void, [dart.dynamic, dart.dynamic])]),
- toString: dart.functionType(core.String, []),
[_computeKeys]: dart.functionType(core.List$(core.String), []),
[_upgrade]: dart.functionType(core.Map, []),
[_process]: dart.functionType(dart.dynamic, [core.String])
@@ -2767,10 +2746,7 @@ var collection = dart.import(collection);
}
}
dart.setSignature(_JsonMapKeyIterable, {
- methods: () => ({
- [core.$elementAt]: dart.functionType(core.String, [core.int]),
- [core.$contains]: dart.functionType(core.bool, [core.Object])
- })
+ methods: () => ({[core.$elementAt]: dart.functionType(core.String, [core.int])})
});
class _JsonDecoderSink extends _StringSinkConversionSink {
_JsonDecoderSink(reviver, sink) {
@@ -2788,9 +2764,7 @@ var collection = dart.import(collection);
this[_sink].close();
}
}
- dart.setSignature(_JsonDecoderSink, {
- methods: () => ({close: dart.functionType(dart.void, [])})
- });
+ dart.setSignature(_JsonDecoderSink, {});
// Exports:
exports.Codec$ = Codec$;
exports.Codec = Codec;

Powered by Google App Engine
This is Rietveld 408576698