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

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

Issue 1971763002: Revert "Adjusts dart2js SSA builder to tolerate 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 // TODO(eernst): 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 [dynamic]. 318 // to resolve the actual bounds; currently we just claim [dynamic].
319 variableElement.boundCache = const DynamicType(); 319 variableElement.boundCache = const DynamicType();
320 TypeVariableType variableType = 320 TypeVariableType variableType = new TypeVariableType(variableElement);
321 new MethodTypeVariableType(variableElement);
322 variableElement.typeCache = variableType; 321 variableElement.typeCache = variableType;
323 return variableType; 322 return variableType;
324 }, growable: false); 323 }, growable: false);
325 return arguments; 324 return arguments;
326 } 325 }
327 326
328 List<DartType> typeVariableTypes = createTypeVariables(typeVariables); 327 List<DartType> typeVariableTypes = createTypeVariables(typeVariables);
329 scope = new FunctionSignatureBuildingScope(scope, typeVariableTypes); 328 scope = new FunctionSignatureBuildingScope(scope, typeVariableTypes);
330 SignatureResolver visitor = new SignatureResolver( 329 SignatureResolver visitor = new SignatureResolver(
331 compiler, element, scope, registry, 330 compiler, element, scope, registry,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 /// variables of the function signature itself when its signature is analyzed. 473 /// variables of the function signature itself when its signature is analyzed.
475 class FunctionSignatureBuildingScope extends TypeVariablesScope { 474 class FunctionSignatureBuildingScope extends TypeVariablesScope {
476 @override 475 @override
477 final List<DartType> typeVariables; 476 final List<DartType> typeVariables;
478 477
479 FunctionSignatureBuildingScope(Scope parent, this.typeVariables) 478 FunctionSignatureBuildingScope(Scope parent, this.typeVariables)
480 : super(parent); 479 : super(parent);
481 480
482 String toString() => 'FunctionSignatureBuildingScope($typeVariables)'; 481 String toString() => 'FunctionSignatureBuildingScope($typeVariables)';
483 } 482 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/runtime_types.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