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

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: Fix status files 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 c61ff480cedd1db45e39ae9102a30f002aef18db..c2ff2c48ed73c5a43b1d75105807cae5b6267b45 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -596,6 +596,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) {
karlklose 2013/06/20 07:32:55 Merge the conditions? Or have one if (type != null
Johnni Winther 2013/06/21 12:19:15 Done.
+ // 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