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

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

Issue 1916053003: Add toStructuredText to ConstantExpression and align method names with ConstantValue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 7 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 elements.modelx; 5 library elements.modelx;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution, ParsingContext; 8 import '../common/resolution.dart' show Resolution, ParsingContext;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/constant_constructors.dart'; 10 import '../constants/constant_constructors.dart';
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 1404
1405 void set constant(ConstantExpression value) { 1405 void set constant(ConstantExpression value) {
1406 if (isPatch) { 1406 if (isPatch) {
1407 ConstantVariableMixin originVariable = origin; 1407 ConstantVariableMixin originVariable = origin;
1408 originVariable.constant = value; 1408 originVariable.constant = value;
1409 return; 1409 return;
1410 } 1410 }
1411 assert(invariant(this, constantCache == null || constantCache == value, 1411 assert(invariant(this, constantCache == null || constantCache == value,
1412 message: "Constant has already been computed for $this. " 1412 message: "Constant has already been computed for $this. "
1413 "Existing constant: " 1413 "Existing constant: "
1414 "${constantCache != null ? constantCache.getText() : ''}, " 1414 "${constantCache != null ? constantCache.toDartText() : ''}, "
1415 "New constant: ${value != null ? value.getText() : ''}.")); 1415 "New constant: ${value != null ? value.toDartText() : ''}."));
1416 constantCache = value; 1416 constantCache = value;
1417 } 1417 }
1418 } 1418 }
1419 1419
1420 abstract class VariableElementX extends ElementX 1420 abstract class VariableElementX extends ElementX
1421 with AstElementMixin, ConstantVariableMixin 1421 with AstElementMixin, ConstantVariableMixin
1422 implements VariableElement { 1422 implements VariableElement {
1423 final Token token; 1423 final Token token;
1424 final VariableList variables; 1424 final VariableList variables;
1425 VariableDefinitions definitionsCache; 1425 VariableDefinitions definitionsCache;
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
3274 if (definingElement.isField) { 3274 if (definingElement.isField) {
3275 FieldElement field = definingElement; 3275 FieldElement field = definingElement;
3276 body = field.initializer; 3276 body = field.initializer;
3277 } else if (node != null && node.asFunctionExpression() != null) { 3277 } else if (node != null && node.asFunctionExpression() != null) {
3278 body = node.asFunctionExpression().body; 3278 body = node.asFunctionExpression().body;
3279 } 3279 }
3280 return new ParsedResolvedAst( 3280 return new ParsedResolvedAst(
3281 declaration, node, body, definingElement.treeElements); 3281 declaration, node, body, definingElement.treeElements);
3282 } 3282 }
3283 } 3283 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_dump.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698