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

Unified Diff: pkg/kernel/lib/transformations/infer_values.dart

Issue 2780513004: [Kernel] Remove code from the old type propagation. (Closed)
Patch Set: Remove empty status file section Created 3 years, 9 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
« no previous file with comments | « pkg/kernel/lib/transformations/closure/converter.dart ('k') | pkg/kernel/lib/type_propagation/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/infer_values.dart
diff --git a/pkg/kernel/lib/transformations/infer_values.dart b/pkg/kernel/lib/transformations/infer_values.dart
deleted file mode 100644
index c7d51c5c7e6e8d6fbb98669d867881c359135380..0000000000000000000000000000000000000000
--- a/pkg/kernel/lib/transformations/infer_values.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library kernel.transformations.infer_types;
-
-import '../ast.dart';
-import '../type_propagation/type_propagation.dart';
-
-Program transformProgram(Program program) {
- TypePropagation propagation = new TypePropagation(program);
-
- var attacher = new InferredValueAttacher(propagation, program);
- attacher.attachInferredValues();
-
- return program;
-}
-
-class InferredValueAttacher extends RecursiveVisitor {
- final TypePropagation propagation;
- final Program program;
-
- InferredValueAttacher(this.propagation, this.program);
-
- attachInferredValues() => program.accept(this);
-
- visitField(Field node) {
- node.inferredValue = propagation.getFieldValue(node);
- super.visitField(node);
- }
-
- visitFunctionNode(FunctionNode node) {
- node.positionalParameters.forEach(_annotateVariableDeclaration);
- node.namedParameters.forEach(_annotateVariableDeclaration);
- node.inferredReturnValue = propagation.getReturnValue(node);
- super.visitFunctionNode(node);
- }
-
- _annotateVariableDeclaration(VariableDeclaration variable) {
- variable.inferredValue = propagation.getParameterValue(variable);
- }
-}
« no previous file with comments | « pkg/kernel/lib/transformations/closure/converter.dart ('k') | pkg/kernel/lib/type_propagation/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698