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

Side by Side Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 2982783003: Use failedAt in more places (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import 'dart:collection' show IterableMixin; 5 import 'dart:collection' show IterableMixin;
6 6
7 import 'package:front_end/src/fasta/fasta_codes.dart' show Message; 7 import 'package:front_end/src/fasta/fasta_codes.dart' show Message;
8 import 'package:front_end/src/fasta/scanner.dart' show Token; 8 import 'package:front_end/src/fasta/scanner.dart' show Token;
9 import 'package:front_end/src/fasta/scanner/token_constants.dart' as Tokens 9 import 'package:front_end/src/fasta/scanner/token_constants.dart' as Tokens
10 show PLUS_TOKEN; 10 show PLUS_TOKEN;
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 return isInterpolationCache; 2153 return isInterpolationCache;
2154 } 2154 }
2155 2155
2156 /** 2156 /**
2157 * Retrieve a single DartString that represents this entire juxtaposition 2157 * Retrieve a single DartString that represents this entire juxtaposition
2158 * of string literals. 2158 * of string literals.
2159 * Should only be called if [isInterpolation] returns false. 2159 * Should only be called if [isInterpolation] returns false.
2160 */ 2160 */
2161 DartString get dartString { 2161 DartString get dartString {
2162 if (isInterpolation) { 2162 if (isInterpolation) {
2163 throw new SpannableAssertionFailure( 2163 failedAt(this, "Getting dartString on interpolation;");
2164 this, "Getting dartString on interpolation;");
2165 } 2164 }
2166 if (dartStringCache == null) { 2165 if (dartStringCache == null) {
2167 DartString firstString = first.accept(const GetDartStringVisitor()); 2166 DartString firstString = first.accept(const GetDartStringVisitor());
2168 DartString secondString = second.accept(const GetDartStringVisitor()); 2167 DartString secondString = second.accept(const GetDartStringVisitor());
2169 if (firstString == null || secondString == null) { 2168 if (firstString == null || secondString == null) {
2170 return null; 2169 return null;
2171 } 2170 }
2172 dartStringCache = new DartString.concat(firstString, secondString); 2171 dartStringCache = new DartString.concat(firstString, secondString);
2173 } 2172 }
2174 return dartStringCache; 2173 return dartStringCache;
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
3283 */ 3282 */
3284 Object getTreeElement(TreeElementMixin node) => node._element; 3283 Object getTreeElement(TreeElementMixin node) => node._element;
3285 3284
3286 /** 3285 /**
3287 * Do not call this method directly. Instead, use an instance of 3286 * Do not call this method directly. Instead, use an instance of
3288 * TreeElements. 3287 * TreeElements.
3289 */ 3288 */
3290 void setTreeElement(TreeElementMixin node, Object value) { 3289 void setTreeElement(TreeElementMixin node, Object value) {
3291 node._element = value; 3290 node._element = value;
3292 } 3291 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/variable_allocator.dart ('k') | pkg/compiler/lib/src/types/constants.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698