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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart

Issue 27524003: Generate tear-off closures dynamically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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: dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
index 68cdfa76a53dbe3d35f419bcd1d1f43a452ab34e..fad4b239e6fbd7111281c6b271e98d2a32cdc8c3 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/type_test_emitter.dart
@@ -70,7 +70,11 @@ class TypeTestEmitter extends CodeEmitterHelper {
RuntimeTypes rti = backend.rti;
jsAst.Expression encoding = rti.getSignatureEncoding(type, thisAccess);
String operatorSignature = namer.operatorSignature();
- builder.addProperty(operatorSignature, encoding);
+ if (!type.containsTypeVariables) {
+ builder.functionType = '${task.metadataEmitter.reifyType(type)}';
+ } else {
+ builder.addProperty(operatorSignature, encoding);
+ }
}
void generateSubstitution(ClassElement cls, {bool emitNull: false}) {

Powered by Google App Engine
This is Rietveld 408576698