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

Side by Side Diff: lib/type_propagation/builder.dart

Issue 2460373002: Remove BlockExpression from the Kernel language. (Closed)
Patch Set: Incorporate review comments, format continuation.dart. Created 4 years, 1 month 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 | « lib/transformations/continuation.dart ('k') | lib/visitor.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) 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 library kernel.type_propagation.builder; 4 library kernel.type_propagation.builder;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../class_hierarchy.dart'; 7 import '../class_hierarchy.dart';
8 import '../core_types.dart'; 8 import '../core_types.dart';
9 import 'canonicalizer.dart'; 9 import 'canonicalizer.dart';
10 import 'constraints.dart'; 10 import 'constraints.dart';
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 int visitNullLiteral(NullLiteral node) { 1491 int visitNullLiteral(NullLiteral node) {
1492 return builder.nullNode; 1492 return builder.nullNode;
1493 } 1493 }
1494 1494
1495 int visitLet(Let node) { 1495 int visitLet(Let node) {
1496 environment.localVariables[node.variable] = 1496 environment.localVariables[node.variable] =
1497 build(node.variable.initializer); 1497 build(node.variable.initializer);
1498 return build(node.body); 1498 return build(node.body);
1499 } 1499 }
1500 1500
1501 int visitBlockExpression(BlockExpression node) {
1502 statementBuilder.build(node.body);
1503 return build(node.value);
1504 }
1505
1506 int buildInnerFunction(FunctionNode node, {VariableDeclaration self}) { 1501 int buildInnerFunction(FunctionNode node, {VariableDeclaration self}) {
1507 int variable = builder.newFunction(node); 1502 int variable = builder.newFunction(node);
1508 if (self != null) { 1503 if (self != null) {
1509 assert(!environment.localVariables.containsKey(self)); 1504 assert(!environment.localVariables.containsKey(self));
1510 environment.localVariables[self] = variable; 1505 environment.localVariables[self] = variable;
1511 } 1506 }
1512 Environment inner = new Environment.inner(environment); 1507 Environment inner = new Environment.inner(environment);
1513 builder.buildFunctionNode(node, inner, function: variable); 1508 builder.buildFunctionNode(node, inner, function: variable);
1514 return variable; 1509 return variable;
1515 } 1510 }
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 environment.addStore(input, field, argument); 1967 environment.addStore(input, field, argument);
1973 } 1968 }
1974 } 1969 }
1975 for (int arity = minArity; arity <= maxArity; ++arity) { 1970 for (int arity = minArity; arity <= maxArity; ++arity) {
1976 int returnLocation = 1971 int returnLocation =
1977 environment.getLoad(input, fieldNames.getReturnField(arity)); 1972 environment.getLoad(input, fieldNames.getReturnField(arity));
1978 visitContravariant(node.returnType, returnLocation); 1973 visitContravariant(node.returnType, returnLocation);
1979 } 1974 }
1980 } 1975 }
1981 } 1976 }
OLDNEW
« no previous file with comments | « lib/transformations/continuation.dart ('k') | lib/visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698