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

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: Merged with r30954 Created 7 years 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 d92cacfeabcd901591f6b892df4c09a474b850a1..92e4f63df5ed6b0ff3ef0099c13705ecf2a7e828 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