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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart

Issue 2913743003: Change the approach of front_end top level inference to match the spec. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.kernel_field_builder; 5 library fasta.kernel_field_builder;
6 6
7 import 'package:front_end/src/fasta/kernel/body_builder.dart' show BodyBuilder; 7 import 'package:front_end/src/fasta/kernel/body_builder.dart' show BodyBuilder;
8 8
9 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart' 9 import 'package:front_end/src/fasta/kernel/kernel_shadow_ast.dart'
10 show KernelField; 10 show KernelField;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 var bodyBuilder = new BodyBuilder( 78 var bodyBuilder = new BodyBuilder(
79 library, 79 library,
80 this, 80 this,
81 memberScope, 81 memberScope,
82 null, 82 null,
83 typeInferenceEngine.classHierarchy, 83 typeInferenceEngine.classHierarchy,
84 typeInferenceEngine.coreTypes, 84 typeInferenceEngine.coreTypes,
85 currentClass, 85 currentClass,
86 isInstanceMember, 86 isInstanceMember,
87 library.uri, 87 library.uri,
88 typeInferrer, 88 typeInferrer);
89 fieldDependencies: typeInferenceEngine.getFieldDependencies(field));
90 Parser parser = new Parser(bodyBuilder); 89 Parser parser = new Parser(bodyBuilder);
91 Token token = parser.parseExpression(initializerToken); 90 Token token = parser.parseExpression(initializerToken);
92 Expression expression = bodyBuilder.popForValue(); 91 Expression expression = bodyBuilder.popForValue();
93 bodyBuilder.checkEmpty(token.charOffset); 92 bodyBuilder.checkEmpty(token.charOffset);
94 initializer = expression; 93 initializer = expression;
95 } 94 }
96 } 95 }
97 96
98 @override 97 @override
99 DartType get builtType => field.type; 98 DartType get builtType => field.type;
100 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698