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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1261623002: Add AccessSemantics.INVALID for invalid expressions. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | pkg/compiler/lib/src/resolution/access_semantics.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index b519c4d82cc5d3544a898f0aa19fcc608b23b008..238a3fc354178c391ded72dc64656a50ce0dca43 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -95,6 +95,7 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
with IrBuilderMixin<ast.Node>,
SemanticSendResolvedMixin<ir.Primitive, dynamic>,
SendResolverMixin,
+ ErrorBulkMixin<ir.Primitive, dynamic>,
BaseImplementationOfStaticsMixin<ir.Primitive, dynamic>,
BaseImplementationOfLocalsMixin<ir.Primitive, dynamic>,
BaseImplementationOfDynamicsMixin<ir.Primitive, dynamic>,
@@ -608,7 +609,7 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
} else {
// The call to assert and its argument expression must be ignored
// in production mode.
- // Assertions can onl)y occur in expression statements, so no value needs
+ // Assertions can only occur in expression statements, so no value needs
// to be returned.
return null;
}
@@ -1722,17 +1723,6 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
ir.Primitive buildAbstractClassInstantiationError(ClassElement element);
@override
- ir.Primitive errorInvalidAssert(
- ast.Send node,
- ast.NodeList arguments, _) {
- if (compiler.enableUserAssertions) {
- return giveup(node, 'Assert');
- } else {
- return irBuilder.buildNullConstant();
- }
- }
-
- @override
ir.Primitive visitUnresolvedCompound(
ast.Send node,
Element element,
@@ -1778,17 +1768,6 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
}
@override
- ir.Primitive errorNonConstantConstructorInvoke(
- ast.NewExpression node,
- Element element,
- DartType type,
- ast.NodeList arguments,
- CallStructure callStructure, _) {
- assert(compiler.compilationFailed);
- return irBuilder.buildNullConstant();
- }
-
- @override
ir.Primitive visitUnresolvedGet(
ast.Send node,
Element element, _) {
@@ -1859,20 +1838,12 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
}
@override
- ir.Primitive errorUndefinedBinaryExpression(
- ast.Send node,
- ast.Node left,
- ast.Operator operator,
- ast.Node right, _) {
- assert(compiler.compilationFailed);
- return irBuilder.buildNullConstant();
+ ir.Primitive bulkHandleNode(ast.Node node, String message, _) {
+ return giveup(node, "Unhandled node: ${message.replaceAll('#', '$node')}");
}
@override
- ir.Primitive errorUndefinedUnaryExpression(
- ast.Send node,
- ast.Operator operator,
- ast.Node expression, _) {
+ ir.Primitive bulkHandleError(ast.Send node, ErroneousElement error, _) {
assert(compiler.compilationFailed);
return irBuilder.buildNullConstant();
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/resolution/access_semantics.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698