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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1180973003: dart2js cps: Support function types in 'is' and 'as' operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update doc comment for TypeCast Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 2050
2051 /// Returns [true], if the analysis could not determine that the type 2051 /// Returns [true], if the analysis could not determine that the type
2052 /// arguments for the class [cls] are never used in the program. 2052 /// arguments for the class [cls] are never used in the program.
2053 bool requiresRuntimeTypesFor(ClassElement cls) { 2053 bool requiresRuntimeTypesFor(ClassElement cls) {
2054 return cls.typeVariables.isNotEmpty && _backend.classNeedsRti(cls); 2054 return cls.typeVariables.isNotEmpty && _backend.classNeedsRti(cls);
2055 } 2055 }
2056 2056
2057 FunctionElement get throwTypeErrorHelper => _backend.getThrowTypeError(); 2057 FunctionElement get throwTypeErrorHelper => _backend.getThrowTypeError();
2058 2058
2059 ClassElement get nullClass => _compiler.nullClass; 2059 ClassElement get nullClass => _compiler.nullClass;
2060
2061 DartType unaliasType(DartType type) => type.unalias(_compiler);
2060 } 2062 }
2061 2063
2062 /// IR builder specific to the JavaScript backend, coupled to the [JsIrBuilder]. 2064 /// IR builder specific to the JavaScript backend, coupled to the [JsIrBuilder].
2063 class JsIrBuilderVisitor extends IrBuilderVisitor { 2065 class JsIrBuilderVisitor extends IrBuilderVisitor {
2064 /// Promote the type of [irBuilder] to [JsIrBuilder]. 2066 /// Promote the type of [irBuilder] to [JsIrBuilder].
2065 JsIrBuilder get irBuilder => super.irBuilder; 2067 JsIrBuilder get irBuilder => super.irBuilder;
2066 2068
2067 JavaScriptBackend get backend => compiler.backend; 2069 JavaScriptBackend get backend => compiler.backend;
2068 2070
2069 /// Result of closure conversion for the current body of code. 2071 /// Result of closure conversion for the current body of code.
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 } 2862 }
2861 2863
2862 processSetStatic(ir.SetStatic node) { 2864 processSetStatic(ir.SetStatic node) {
2863 node.body = replacementFor(node.body); 2865 node.body = replacementFor(node.body);
2864 } 2866 }
2865 2867
2866 processContinuation(ir.Continuation node) { 2868 processContinuation(ir.Continuation node) {
2867 node.body = replacementFor(node.body); 2869 node.body = replacementFor(node.body);
2868 } 2870 }
2869 } 2871 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698