| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3963 } else { | 3963 } else { |
| 3964 reporter.internalError( | 3964 reporter.internalError( |
| 3965 type.element, 'Unexpected type variable in static context.'); | 3965 type.element, 'Unexpected type variable in static context.'); |
| 3966 return null; | 3966 return null; |
| 3967 } | 3967 } |
| 3968 } | 3968 } |
| 3969 | 3969 |
| 3970 HInstruction analyzeTypeArgument(DartType argument, | 3970 HInstruction analyzeTypeArgument(DartType argument, |
| 3971 {SourceInformation sourceInformation}) { | 3971 {SourceInformation sourceInformation}) { |
| 3972 assert(assertTypeInContext(argument)); | 3972 assert(assertTypeInContext(argument)); |
| 3973 argument = argument.unaliased; |
| 3973 if (argument.treatAsDynamic) { | 3974 if (argument.treatAsDynamic) { |
| 3974 // Represent [dynamic] as [null]. | 3975 // Represent [dynamic] as [null]. |
| 3975 return graph.addConstantNull(compiler); | 3976 return graph.addConstantNull(compiler); |
| 3976 } | 3977 } |
| 3977 | 3978 |
| 3978 if (argument.isTypeVariable) { | 3979 if (argument.isTypeVariable) { |
| 3979 return addTypeVariableReference(argument, | 3980 return addTypeVariableReference(argument, |
| 3980 sourceInformation: sourceInformation); | 3981 sourceInformation: sourceInformation); |
| 3981 } | 3982 } |
| 3982 | 3983 |
| (...skipping 3839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7822 const _LoopTypeVisitor(); | 7823 const _LoopTypeVisitor(); |
| 7823 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP; | 7824 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP; |
| 7824 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP; | 7825 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP; |
| 7825 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP; | 7826 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP; |
| 7826 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; | 7827 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; |
| 7827 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; | 7828 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; |
| 7828 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; | 7829 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; |
| 7829 int visitSwitchStatement(ast.SwitchStatement node) => | 7830 int visitSwitchStatement(ast.SwitchStatement node) => |
| 7830 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; | 7831 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; |
| 7831 } | 7832 } |
| OLD | NEW |