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

Side by Side Diff: pkg/compiler/lib/src/constants/evaluation.dart

Issue 1348063002: Make the universe parts into small libraries. (Closed) Base URL: https://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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.constants.evaluation; 5 library dart2js.constants.evaluation;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../universe/universe.dart' show 9 import '../universe/call_structure.dart' show
10 CallStructure; 10 CallStructure;
11 import 'expressions.dart'; 11 import 'expressions.dart';
12 12
13 /// Environment used for evaluating constant expressions. 13 /// Environment used for evaluating constant expressions.
14 abstract class Environment { 14 abstract class Environment {
15 // TODO(johnniwinther): Replace this with [CoreTypes] and maybe [Backend]. 15 // TODO(johnniwinther): Replace this with [CoreTypes] and maybe [Backend].
16 Compiler get compiler; 16 Compiler get compiler;
17 17
18 /// Read environments string passed in using the '-Dname=value' option. 18 /// Read environments string passed in using the '-Dname=value' option.
19 String readFromEnvironment(String name); 19 String readFromEnvironment(String name);
(...skipping 20 matching lines...) Expand all
40 40
41 /// Returns the normalized [index]th positional argument. 41 /// Returns the normalized [index]th positional argument.
42 ConstantExpression getPositionalArgument(int index) { 42 ConstantExpression getPositionalArgument(int index) {
43 if (index >= callStructure.positionalArgumentCount) { 43 if (index >= callStructure.positionalArgumentCount) {
44 // The positional argument is not provided. 44 // The positional argument is not provided.
45 return defaultValues[index]; 45 return defaultValues[index];
46 } 46 }
47 return arguments[index]; 47 return arguments[index];
48 } 48 }
49 } 49 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/constants/constructors.dart ('k') | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698