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

Side by Side Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 2021133003: Revert "Introduces "--initializing-formal-access"." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « pkg/compiler/lib/src/commandline_options.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.compile_time_constant_evaluator; 5 library dart2js.compile_time_constant_evaluator;
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, Measurer; 9 import 'common/tasks.dart' show CompilerTask, Measurer;
10 import 'compiler.dart' show Compiler; 10 import 'compiler.dart' show Compiler;
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 if (constructor.isMalformed) return; 1175 if (constructor.isMalformed) return;
1176 // Assign arguments to parameters. 1176 // Assign arguments to parameters.
1177 FunctionSignature signature = constructor.functionSignature; 1177 FunctionSignature signature = constructor.functionSignature;
1178 int index = 0; 1178 int index = 0;
1179 signature.orderedForEachParameter((ParameterElement parameter) { 1179 signature.orderedForEachParameter((ParameterElement parameter) {
1180 AstConstant argument = arguments[index++]; 1180 AstConstant argument = arguments[index++];
1181 Node node = parameter.node; 1181 Node node = parameter.node;
1182 if (parameter.isInitializingFormal) { 1182 if (parameter.isInitializingFormal) {
1183 InitializingFormalElement initializingFormal = parameter; 1183 InitializingFormalElement initializingFormal = parameter;
1184 updateFieldValue(node, initializingFormal.fieldElement, argument); 1184 updateFieldValue(node, initializingFormal.fieldElement, argument);
1185 if (compiler.options.enableInitializingFormalAccess) {
1186 definitions[parameter] = argument;
1187 }
1188 } else { 1185 } else {
1189 potentiallyCheckType(parameter, argument); 1186 potentiallyCheckType(parameter, argument);
1190 definitions[parameter] = argument; 1187 definitions[parameter] = argument;
1191 } 1188 }
1192 }); 1189 });
1193 } 1190 }
1194 1191
1195 void evaluateSuperOrRedirectSend( 1192 void evaluateSuperOrRedirectSend(
1196 List<AstConstant> compiledArguments, FunctionElement targetConstructor) { 1193 List<AstConstant> compiledArguments, FunctionElement targetConstructor) {
1197 ConstructorEvaluator evaluator = new ConstructorEvaluator( 1194 ConstructorEvaluator evaluator = new ConstructorEvaluator(
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 class _CompilerEnvironment implements Environment { 1363 class _CompilerEnvironment implements Environment {
1367 final Compiler compiler; 1364 final Compiler compiler;
1368 1365
1369 _CompilerEnvironment(this.compiler); 1366 _CompilerEnvironment(this.compiler);
1370 1367
1371 @override 1368 @override
1372 String readFromEnvironment(String name) { 1369 String readFromEnvironment(String name) {
1373 return compiler.fromEnvironment(name); 1370 return compiler.fromEnvironment(name);
1374 } 1371 }
1375 } 1372 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/commandline_options.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698