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

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

Issue 2603263002: Prefix resolution_types with Resolution. (Closed)
Patch Set: Rebased Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_backend/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index af7072bb21c7ff75b28cfab6bc25b775b7b42014..c5b70b820814fcfbdddcb3d5e65416c6f286ec96 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -1475,18 +1475,18 @@ class Namer {
String get functionTypeNamedParametersTag => r'named';
- Map<FunctionType, jsAst.Name> functionTypeNameMap =
- new HashMap<FunctionType, jsAst.Name>();
+ Map<ResolutionFunctionType, jsAst.Name> functionTypeNameMap =
+ new HashMap<ResolutionFunctionType, jsAst.Name>();
final FunctionTypeNamer functionTypeNamer;
- jsAst.Name getFunctionTypeName(FunctionType functionType) {
+ jsAst.Name getFunctionTypeName(ResolutionFunctionType functionType) {
return functionTypeNameMap.putIfAbsent(functionType, () {
String proposedName = functionTypeNamer.computeName(functionType);
return getFreshName(instanceScope, proposedName);
});
}
- jsAst.Name operatorIsType(DartType type) {
+ jsAst.Name operatorIsType(ResolutionDartType type) {
if (type.isFunctionType) {
// TODO(erikcorry): Reduce from $isx to ix when we are minifying.
return new CompoundName([
@@ -1792,7 +1792,7 @@ class ConstantNamingVisitor implements ConstantValueVisitor {
// Generates something like 'Type_String_k8F', using the simple name of the
// type and a hash to disambiguate the same name in different libraries.
addRoot('Type');
- DartType type = constant.representedType;
+ ResolutionDartType type = constant.representedType;
String name = type.element?.name;
if (name == null) {
// e.g. DartType 'dynamic' has no element.
@@ -1914,7 +1914,7 @@ class ConstantCanonicalHasher implements ConstantValueVisitor<int, Null> {
@override
int visitType(TypeConstantValue constant, [_]) {
- DartType type = constant.representedType;
+ ResolutionDartType type = constant.representedType;
// This name includes the library name and type parameters.
String name = rtiEncoder.getTypeRepresentationForTypeConstant(type);
return _hashString(4, name);
@@ -2028,33 +2028,33 @@ class FunctionTypeNamer extends BaseDartTypeVisitor {
FunctionTypeNamer(this.rtiEncoder);
- String computeName(DartType type) {
+ String computeName(ResolutionDartType type) {
sb = new StringBuffer();
visit(type);
return sb.toString();
}
- visit(DartType type, [_]) {
+ visit(ResolutionDartType type, [_]) {
type.accept(this, null);
}
- visitType(DartType type, _) {
+ visitType(ResolutionDartType type, _) {
sb.write(type.name);
}
- visitFunctionType(FunctionType type, _) {
+ visitFunctionType(ResolutionFunctionType type, _) {
if (rtiEncoder.isSimpleFunctionType(type)) {
sb.write('args${type.parameterTypes.length}');
return;
}
visit(type.returnType);
sb.write('_');
- for (DartType parameter in type.parameterTypes) {
+ for (ResolutionDartType parameter in type.parameterTypes) {
sb.write('_');
visit(parameter);
}
bool first = false;
- for (DartType parameter in type.optionalParameterTypes) {
+ for (ResolutionDartType parameter in type.optionalParameterTypes) {
if (!first) {
sb.write('_');
}
@@ -2064,7 +2064,7 @@ class FunctionTypeNamer extends BaseDartTypeVisitor {
}
if (!type.namedParameterTypes.isEmpty) {
first = false;
- for (DartType parameter in type.namedParameterTypes) {
+ for (ResolutionDartType parameter in type.namedParameterTypes) {
if (!first) {
sb.write('_');
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart ('k') | pkg/compiler/lib/src/js_backend/patch_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698