Chromium Code Reviews| 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 c133788a1f9a2fa81d5a5ebb791b7f7702173bc7..62e636d383c7c45fd9390c24fe19c3494a3c25ec 100644 |
| --- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart |
| +++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart |
| @@ -384,6 +384,18 @@ class CodeGenerator extends tree_ir.StatementVisitor |
| return buildStaticHelperInvocation( |
| glue.getCheckSubtype(), |
| [value, isT, typeArgumentArray, asT]); |
| + } else if (type is TypeVariableType) { |
| + glue.registerIsCheck(type, registry); |
| + // The only type argument is the type held in the type variable. |
| + js.Expression typeValue = typeArguments.single; |
| + |
| + // We use the helper: |
|
karlklose
2015/05/28 07:42:30
I am not sure these comments have much value. Mayb
asgerf
2015/05/28 08:52:55
I added the doc comments to glue and removed this
|
| + // |
| + // checkSubtypeOfRuntime(value, runtimeType) |
| + // |
| + return buildStaticHelperInvocation( |
| + glue.getCheckSubtypeOfRuntime(), |
| + [value, typeValue]); |
|
karlklose
2015/05/28 07:42:30
Add type arguments to list (also in line 386.)
asgerf
2015/05/28 08:52:55
Done.
|
| } |
| return giveup(node, 'type check unimplemented for $type.'); |
| } |