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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 12334070: Support runtime check of function types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Handle function types in checked mode. Created 7 years, 6 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index ffcab4d5e98b50d05897c134d93600931efd57a9..397071f86754a698c703fa15e4e7c07058143fec 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -606,6 +606,10 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
if (type != null && (!type.isRaw || type.kind == TypeKind.TYPE_VARIABLE)) {
return node;
}
+ if (type != null && type.kind == TypeKind.FUNCTION) {
+ // TODO(johnniwinther): Optimize function type conversions.
+ return node;
+ }
HType convertedType = node.instructionType;
if (convertedType.isUnknown()) return node;
HType combinedType = value.instructionType.intersection(

Powered by Google App Engine
This is Rietveld 408576698