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

Side by Side Diff: pkg/compiler/lib/src/js_backend/patch_resolver.dart

Issue 2569733002: Even less reliance on Compiler.closedWorld (Closed)
Patch Set: Updated cf. comments. Created 4 years 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.js_backend.patch_resolver; 5 library dart2js.js_backend.patch_resolver;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution; 8 import '../common/resolution.dart' show Resolution;
9 import '../common/tasks.dart' show CompilerTask; 9 import '../common/tasks.dart' show CompilerTask;
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // elsewhere. 77 // elsewhere.
78 78
79 // The node contains the type, so there is a potential overlap. 79 // The node contains the type, so there is a potential overlap.
80 // Therefore we only check the text if the types are identical. 80 // Therefore we only check the text if the types are identical.
81 String originParameterText = originParameter.node.toString(); 81 String originParameterText = originParameter.node.toString();
82 String patchParameterText = patchParameter.node.toString(); 82 String patchParameterText = patchParameter.node.toString();
83 if (originParameterText != patchParameterText 83 if (originParameterText != patchParameterText
84 // We special case the list constructor because of the 84 // We special case the list constructor because of the
85 // optional parameter. 85 // optional parameter.
86 && 86 &&
87 origin != compiler.unnamedListConstructor) { 87 origin != compiler.commonElements.unnamedListConstructor) {
88 reporter.reportError( 88 reporter.reportError(
89 reporter.createMessage( 89 reporter.createMessage(
90 originParameter, MessageKind.PATCH_PARAMETER_MISMATCH, { 90 originParameter, MessageKind.PATCH_PARAMETER_MISMATCH, {
91 'methodName': origin.name, 91 'methodName': origin.name,
92 'originParameter': originParameterText, 92 'originParameter': originParameterText,
93 'patchParameter': patchParameterText 93 'patchParameter': patchParameterText
94 }), 94 }),
95 <DiagnosticMessage>[ 95 <DiagnosticMessage>[
96 reporter.createMessage( 96 reporter.createMessage(
97 patchParameter, 97 patchParameter,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 'originParameterCount': originSignature.optionalParameterCount, 171 'originParameterCount': originSignature.optionalParameterCount,
172 'patchParameterCount': patchSignature.optionalParameterCount 172 'patchParameterCount': patchSignature.optionalParameterCount
173 }); 173 });
174 }); 174 });
175 } else { 175 } else {
176 checkMatchingPatchParameters(origin, originSignature.optionalParameters, 176 checkMatchingPatchParameters(origin, originSignature.optionalParameters,
177 patchSignature.optionalParameters); 177 patchSignature.optionalParameters);
178 } 178 }
179 } 179 }
180 } 180 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698