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

Unified Diff: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart

Issue 2439573003: Experiment with new function-type syntax.
Patch Set: Change a few more typedefs. Created 4 years, 2 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/compiler/lib/src/js_emitter/runtime_type_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 170d16d07dc0629a424fd435cec13c0faf30ba93..b444a40c707ac1f4ebc655a7ead06867ea9cc49c 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -4,12 +4,6 @@
part of dart2js.js_emitter;
-// Function signatures used in the generation of runtime type information.
-typedef void FunctionTypeSignatureEmitter(
- Element method, FunctionType methodType);
-
-typedef void SubstitutionEmitter(Element element, {bool emitNull});
-
class TypeTestProperties {
/// The index of the function type into the metadata.
///
@@ -157,9 +151,10 @@ class RuntimeTypeGenerator {
*/
void _generateIsTestsOn(
ClassElement cls,
- void generateIsTest(Element element),
- FunctionTypeSignatureEmitter generateFunctionTypeSignature,
- SubstitutionEmitter generateSubstitution,
+ (Element) -> void generateIsTest,
+ (Element method, FunctionType methodType) -> void
+ generateFunctionTypeSignature,
+ (Element, {bool emitNull}) -> void generateSubstitution,
void emitTypeCheck(TypeCheck check)) {
Setlet<Element> generated = new Setlet<Element>();
@@ -267,9 +262,10 @@ class RuntimeTypeGenerator {
*/
void _generateInterfacesIsTests(
ClassElement cls,
- void generateIsTest(ClassElement element),
- SubstitutionEmitter generateSubstitution,
+ ClassElement -> void generateIsTest,
+ (Element, {bool emitNull}) -> void generateSubstitution,
Set<Element> alreadyGenerated) {
+
void tryEmitTest(ClassElement check) {
if (!alreadyGenerated.contains(check) && checkedClasses.contains(check)) {
alreadyGenerated.add(check);

Powered by Google App Engine
This is Rietveld 408576698