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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 812023002: Use CURRENT_ELEMENT_SPANNABLE in invariant. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../dart2jslib.dart' as dart2js; 7 import '../dart2jslib.dart' as dart2js;
8 import '../dart_types.dart'; 8 import '../dart_types.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 ++variable.readCount; 109 ++variable.readCount;
110 return variable; 110 return variable;
111 } 111 }
112 112
113 ExecutableDefinition build(cps_ir.ExecutableDefinition node) { 113 ExecutableDefinition build(cps_ir.ExecutableDefinition node) {
114 if (node is cps_ir.FieldDefinition) { 114 if (node is cps_ir.FieldDefinition) {
115 return buildField(node); 115 return buildField(node);
116 } else { 116 } else {
117 assert(dart2js.invariant( 117 assert(dart2js.invariant(
118 currentElement, 118 CURRENT_ELEMENT_SPANNABLE,
119 node is cps_ir.FunctionDefinition, 119 node is cps_ir.FunctionDefinition,
120 message: 'expected FunctionDefinition or FieldDefinition, ' 120 message: 'expected FunctionDefinition or FieldDefinition, '
121 ' found $node')); 121 ' found $node'));
122 return buildFunction(node); 122 return buildFunction(node);
123 } 123 }
124 return null; 124 return null;
125 } 125 }
126 126
127 FieldDefinition buildField(cps_ir.FieldDefinition node) { 127 FieldDefinition buildField(cps_ir.FieldDefinition node) {
128 Statement body; 128 Statement body;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // visited. 544 // visited.
545 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node.'); 545 internalError(CURRENT_ELEMENT_SPANNABLE, 'Unexpected IR node: $node.');
546 return null; 546 return null;
547 } 547 }
548 548
549 Expression visitIsTrue(cps_ir.IsTrue node) { 549 Expression visitIsTrue(cps_ir.IsTrue node) {
550 return getVariableReference(node.value); 550 return getVariableReference(node.value);
551 } 551 }
552 } 552 }
553 553
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698