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

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

Issue 1087483003: cps-ir: Don't bail on assert in unchecked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/compiler/dart2js/js_backend_cps_ir_basic_test.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) 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 '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // Throw away the result of visiting the expression. 629 // Throw away the result of visiting the expression.
630 // Instead we return the result of visiting the CascadeReceiver. 630 // Instead we return the result of visiting the CascadeReceiver.
631 this.visit(node.expression); 631 this.visit(node.expression);
632 ir.Primitive receiver = _currentCascadeReceiver; 632 ir.Primitive receiver = _currentCascadeReceiver;
633 _currentCascadeReceiver = oldCascadeReceiver; 633 _currentCascadeReceiver = oldCascadeReceiver;
634 return receiver; 634 return receiver;
635 } 635 }
636 636
637 // ## Sends ## 637 // ## Sends ##
638 @override 638 @override
639 ir.Primitive visitAssert( 639 visitAssert(ast.Send node, ast.Node condition, _) {
karlklose 2015/04/13 12:31:51 I would prefer to keep the type annotation and to
asgerf 2015/04/13 12:35:55 Done.
640 ast.Send node,
641 ast.Node condition,
642 _) {
643 assert(irBuilder.isOpen); 640 assert(irBuilder.isOpen);
644 return giveup(node, 'Assert'); 641 if (!compiler.enableUserAssertions) {
642 return;
643 }
644 giveup(node, 'Assert');
645 } 645 }
646 646
647 ir.Primitive visitNamedArgument(ast.NamedArgument node) { 647 ir.Primitive visitNamedArgument(ast.NamedArgument node) {
648 assert(irBuilder.isOpen); 648 assert(irBuilder.isOpen);
649 return visit(node.expression); 649 return visit(node.expression);
650 } 650 }
651 651
652 @override 652 @override
653 ir.Primitive visitExpressionInvoke(ast.Send node, 653 ir.Primitive visitExpressionInvoke(ast.Send node,
654 ast.Node expression, 654 ast.Node expression,
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after
2737 SourceInformation buildCall(ast.Node node) { 2737 SourceInformation buildCall(ast.Node node) {
2738 return new PositionSourceInformation( 2738 return new PositionSourceInformation(
2739 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); 2739 new TokenSourceLocation(sourceFile, node.getBeginToken(), name));
2740 } 2740 }
2741 2741
2742 @override 2742 @override
2743 SourceInformationBuilder forContext(AstElement element) { 2743 SourceInformationBuilder forContext(AstElement element) {
2744 return new PositionSourceInformationBuilder(element); 2744 return new PositionSourceInformationBuilder(element);
2745 } 2745 }
2746 } 2746 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698