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

Side by Side Diff: pkg/compiler/lib/src/resolution/signatures.dart

Issue 2000223002: Revert "Adjusts dart2js backend to handle method type arguments." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.resolution.signatures; 5 library dart2js.resolution.signatures;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 // Create the types and elements corresponding to [typeVariableNodes]. 308 // Create the types and elements corresponding to [typeVariableNodes].
309 Link<Node> nodes = typeVariableNodes.nodes; 309 Link<Node> nodes = typeVariableNodes.nodes;
310 List<DartType> arguments = 310 List<DartType> arguments =
311 new List.generate(nodes.slowLength(), (int index) { 311 new List.generate(nodes.slowLength(), (int index) {
312 TypeVariable node = nodes.head; 312 TypeVariable node = nodes.head;
313 String variableName = node.name.source; 313 String variableName = node.name.source;
314 nodes = nodes.tail; 314 nodes = nodes.tail;
315 TypeVariableElementX variableElement = 315 TypeVariableElementX variableElement =
316 new TypeVariableElementX(variableName, element, index, node); 316 new TypeVariableElementX(variableName, element, index, node);
317 // GENERIC_METHODS: When method type variables are implemented fully we 317 // TODO(eernst): When type variables are implemented fully we will need
318 // must resolve the actual bounds; currently we just claim that 318 // to resolve the actual bounds; currently we just claim [dynamic].
319 // every method type variable has upper bound [dynamic].
320 variableElement.boundCache = const DynamicType(); 319 variableElement.boundCache = const DynamicType();
321 TypeVariableType variableType = 320 TypeVariableType variableType = new TypeVariableType(variableElement);
322 new MethodTypeVariableType(variableElement);
323 variableElement.typeCache = variableType; 321 variableElement.typeCache = variableType;
324 return variableType; 322 return variableType;
325 }, growable: false); 323 }, growable: false);
326 return arguments; 324 return arguments;
327 } 325 }
328 326
329 List<DartType> typeVariableTypes = createTypeVariables(typeVariables); 327 List<DartType> typeVariableTypes = createTypeVariables(typeVariables);
330 scope = new FunctionSignatureBuildingScope(scope, typeVariableTypes); 328 scope = new FunctionSignatureBuildingScope(scope, typeVariableTypes);
331 SignatureResolver visitor = new SignatureResolver( 329 SignatureResolver visitor = new SignatureResolver(
332 compiler, element, scope, registry, 330 compiler, element, scope, registry,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 /// variables of the function signature itself when its signature is analyzed. 473 /// variables of the function signature itself when its signature is analyzed.
476 class FunctionSignatureBuildingScope extends TypeVariablesScope { 474 class FunctionSignatureBuildingScope extends TypeVariablesScope {
477 @override 475 @override
478 final List<DartType> typeVariables; 476 final List<DartType> typeVariables;
479 477
480 FunctionSignatureBuildingScope(Scope parent, this.typeVariables) 478 FunctionSignatureBuildingScope(Scope parent, this.typeVariables)
481 : super(parent); 479 : super(parent);
482 480
483 String toString() => 'FunctionSignatureBuildingScope($typeVariables)'; 481 String toString() => 'FunctionSignatureBuildingScope($typeVariables)';
484 } 482 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/constructors.dart ('k') | pkg/compiler/lib/src/resolution/type_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698