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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1346093003: Revert "Add optional message to assert in Dart2js - continued" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../common/names.dart' show 9 import '../common/names.dart' show
10 Names, 10 Names,
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 assert(irBuilder.isOpen); 641 assert(irBuilder.isOpen);
642 var oldCascadeReceiver = _currentCascadeReceiver; 642 var oldCascadeReceiver = _currentCascadeReceiver;
643 // Throw away the result of visiting the expression. 643 // Throw away the result of visiting the expression.
644 // Instead we return the result of visiting the CascadeReceiver. 644 // Instead we return the result of visiting the CascadeReceiver.
645 visit(node.expression); 645 visit(node.expression);
646 ir.Primitive receiver = _currentCascadeReceiver; 646 ir.Primitive receiver = _currentCascadeReceiver;
647 _currentCascadeReceiver = oldCascadeReceiver; 647 _currentCascadeReceiver = oldCascadeReceiver;
648 return receiver; 648 return receiver;
649 } 649 }
650 650
651 // ## Sends ##
651 @override 652 @override
652 ir.Primitive visitAssert(ast.Assert node) { 653 ir.Primitive visitAssert(ast.Send node, ast.Node condition, _) {
653 assert(irBuilder.isOpen); 654 assert(irBuilder.isOpen);
654 if (compiler.enableUserAssertions) { 655 if (compiler.enableUserAssertions) {
655 return giveup(node, 'assert in checked mode not implemented'); 656 return giveup(node, 'assert in checked mode not implemented');
656 } else { 657 } else {
657 // The call to assert and its argument expression must be ignored 658 // The call to assert and its argument expression must be ignored
658 // in production mode. 659 // in production mode.
659 // Assertions can only occur in expression statements, so no value needs 660 // Assertions can only occur in expression statements, so no value needs
660 // to be returned. 661 // to be returned.
661 return null; 662 return null;
662 } 663 }
663 } 664 }
664 665
665 // ## Sends ##
666 @override 666 @override
667 void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) { 667 void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) {
668 giveup(node, 'deferred access is not implemented'); 668 giveup(node, 'deferred access is not implemented');
669 } 669 }
670 670
671 ir.Primitive visitNamedArgument(ast.NamedArgument node) { 671 ir.Primitive visitNamedArgument(ast.NamedArgument node) {
672 assert(irBuilder.isOpen); 672 assert(irBuilder.isOpen);
673 return visit(node.expression); 673 return visit(node.expression);
674 } 674 }
675 675
(...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after
3570 if (compiler.backend.isForeign(function)) { 3570 if (compiler.backend.isForeign(function)) {
3571 return handleForeignCode(node, function, argumentList, callStructure); 3571 return handleForeignCode(node, function, argumentList, callStructure);
3572 } else { 3572 } else {
3573 return irBuilder.buildStaticFunctionInvocation(function, callStructure, 3573 return irBuilder.buildStaticFunctionInvocation(function, callStructure,
3574 translateStaticArguments(argumentList, function, callStructure), 3574 translateStaticArguments(argumentList, function, callStructure),
3575 sourceInformation: 3575 sourceInformation:
3576 sourceInformationBuilder.buildCall(node, node.selector)); 3576 sourceInformationBuilder.buildCall(node, node.selector));
3577 } 3577 }
3578 } 3578 }
3579 } 3579 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698