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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/codegen.dart

Issue 1422623014: Add TypeUse. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 1 month 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/codegen.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index a51d3664d858bc847a9ff6bb94ccc95a3db5620e..86239283fcb6b8af131125b4d46b0a32961af070 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -29,7 +29,8 @@ import '../../universe/selector.dart' show
Selector;
import '../../universe/use.dart' show
DynamicUse,
- StaticUse;
+ StaticUse,
+ TypeUse;
import '../../util/maplet.dart';
class CodegenBailout {
@@ -382,7 +383,7 @@ class CodeGenerator extends tree_ir.StatementVisitor
List<js.Expression> typeArguments = visitExpressionList(node.typeArguments);
DartType type = node.type;
if (type is InterfaceType) {
- registry.registerIsCheck(type);
+ registry.registerTypeUse(new TypeUse.isCheck(type));
//glue.registerIsCheck(type, registry);
ClassElement clazz = type.element;
@@ -428,8 +429,7 @@ class CodeGenerator extends tree_ir.StatementVisitor
function,
<js.Expression>[value, isT, typeArgumentArray, asT]);
} else if (type is TypeVariableType || type is FunctionType) {
- registry.registerIsCheck(type);
- //glue.registerIsCheck(type, registry);
+ registry.registerTypeUse(new TypeUse.isCheck(type));
Element function = node.isTypeTest
? glue.getCheckSubtypeOfRuntimeType()
@@ -450,7 +450,7 @@ class CodeGenerator extends tree_ir.StatementVisitor
js.Expression object = visitExpression(node.object);
DartType dartType = node.dartType;
assert(dartType.isInterfaceType);
- registry.registerIsCheck(dartType);
+ registry.registerTypeUse(new TypeUse.isCheck(dartType));
//glue.registerIsCheck(dartType, registry);
js.Expression property = glue.getTypeTestTag(dartType);
return js.js(r'#.#', [object, property]);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698