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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1348573004: dart2js: Don't return `null` from void functions. (Closed) Base URL: git@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
« no previous file with comments | « no previous file | pkg/js_ast/lib/src/template.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 elements.modelx; 5 library elements.modelx;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../constants/constant_constructors.dart'; 9 import '../constants/constant_constructors.dart';
10 import '../constants/constructors.dart'; 10 import '../constants/constructors.dart';
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 } 1293 }
1294 assert(invariant(this, constantCache != null, 1294 assert(invariant(this, constantCache != null,
1295 message: "Constant has not been computed for $this.")); 1295 message: "Constant has not been computed for $this."));
1296 return constantCache; 1296 return constantCache;
1297 } 1297 }
1298 1298
1299 void set constant(ConstantExpression value) { 1299 void set constant(ConstantExpression value) {
1300 if (isPatch) { 1300 if (isPatch) {
1301 ConstantVariableMixin originVariable = origin; 1301 ConstantVariableMixin originVariable = origin;
1302 originVariable.constant = value; 1302 originVariable.constant = value;
1303 return null; 1303 return;
1304 } 1304 }
1305 assert(invariant( 1305 assert(invariant(
1306 this, constantCache == null || constantCache == value, 1306 this, constantCache == null || constantCache == value,
1307 message: "Constant has already been computed for $this. " 1307 message: "Constant has already been computed for $this. "
1308 "Existing constant: " 1308 "Existing constant: "
1309 "${constantCache != null ? constantCache.getText() : ''}, " 1309 "${constantCache != null ? constantCache.getText() : ''}, "
1310 "New constant: ${value != null ? value.getText() : ''}.")); 1310 "New constant: ${value != null ? value.getText() : ''}."));
1311 constantCache = value; 1311 constantCache = value;
1312 } 1312 }
1313 } 1313 }
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 AstElement get definingElement; 2967 AstElement get definingElement;
2968 2968
2969 bool get hasResolvedAst => definingElement.hasTreeElements; 2969 bool get hasResolvedAst => definingElement.hasTreeElements;
2970 2970
2971 ResolvedAst get resolvedAst { 2971 ResolvedAst get resolvedAst {
2972 return new ResolvedAst(declaration, 2972 return new ResolvedAst(declaration,
2973 definingElement.node, definingElement.treeElements); 2973 definingElement.node, definingElement.treeElements);
2974 } 2974 }
2975 2975
2976 } 2976 }
OLDNEW
« no previous file with comments | « no previous file | pkg/js_ast/lib/src/template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698