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

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

Issue 17413013: Revert "Support runtime check of function types." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 f8ef54e8c134f8f613b17c7e6f0e5c1da1cb5b30..ce291f22e1685b73ec61edb9b7f60d258fddc13b 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -596,14 +596,8 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
HInstruction visitTypeConversion(HTypeConversion node) {
HInstruction value = node.inputs[0];
DartType type = node.typeExpression;
- if (type != null) {
- if (!type.isRaw || type.kind == TypeKind.TYPE_VARIABLE) {
- return node;
- }
- if (type.kind == TypeKind.FUNCTION) {
- // TODO(johnniwinther): Optimize function type conversions.
- return node;
- }
+ if (type != null && (!type.isRaw || type.kind == TypeKind.TYPE_VARIABLE)) {
+ return node;
}
HType convertedType = node.instructionType;
if (convertedType.isUnknown()) return node;
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | sdk/lib/_internal/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698