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

Unified Diff: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.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_emitter/program_builder/program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
index c9fe88c4680316b0cf634d9fee82e1a0c3563e15..0448ef64107b8e661928045f68238b3c98dbb8f7 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart
@@ -12,7 +12,7 @@ import '../../constants/values.dart'
show ConstantValue, InterceptorConstantValue;
import '../../core_types.dart' show CommonElements;
import '../../elements/resolution_types.dart'
- show DartType, FunctionType, TypedefType;
+ show ResolutionDartType, ResolutionFunctionType, ResolutionTypedefType;
import '../../deferred_load.dart' show DeferredLoadTask, OutputUnit;
import '../../elements/elements.dart'
show
@@ -384,7 +384,7 @@ class ProgramBuilder {
// Generating stubs for direct calls and stubs for call-through
// of getters that happen to be functions.
bool isFunctionLike = false;
- FunctionType functionType = null;
+ ResolutionFunctionType functionType = null;
if (member.isFunction) {
FunctionElement fn = member;
@@ -392,14 +392,14 @@ class ProgramBuilder {
} else if (member.isGetter) {
if (_compiler.options.trustTypeAnnotations) {
GetterElement getter = member;
- DartType returnType = getter.type.returnType;
+ ResolutionDartType returnType = getter.type.returnType;
if (returnType.isFunctionType) {
functionType = returnType;
} else if (returnType.treatAsDynamic ||
_compiler.types.isSubtype(
returnType, backend.commonElements.functionType)) {
if (returnType.isTypedef) {
- TypedefType typedef = returnType;
+ ResolutionTypedefType typedef = returnType;
// TODO(jacobr): can we just use typdef.unaliased instead?
functionType = typedef.element.functionSignature.type;
} else {
@@ -762,7 +762,7 @@ class ProgramBuilder {
callName = namer.invocationName(callSelector);
}
- DartType memberType;
+ ResolutionDartType memberType;
if (element.isGenerativeConstructorBody) {
// TODO(herhut): Why does this need to be normalized away? We never need
// this information anyway as they cannot be torn off or
@@ -802,7 +802,8 @@ class ProgramBuilder {
functionType: functionType);
}
- js.Expression _generateFunctionType(DartType type, OutputUnit outputUnit) {
+ js.Expression _generateFunctionType(
+ ResolutionDartType type, OutputUnit outputUnit) {
if (type.containsTypeVariables) {
js.Expression thisAccess = js.js(r'this.$receiver');
return backend.rtiEncoder.getSignatureEncoding(type, thisAccess);
@@ -946,7 +947,7 @@ class ProgramBuilder {
callName = namer.invocationName(callSelector);
}
js.Expression functionType;
- DartType type = element.type;
+ ResolutionDartType type = element.type;
if (needsTearOff || canBeReflected) {
OutputUnit outputUnit =
_compiler.deferredLoadTask.outputUnitForElement(element);

Powered by Google App Engine
This is Rietveld 408576698