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

Unified Diff: lib/compiler/implementation/compile_time_constants.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/compile_time_constants.dart
===================================================================
--- lib/compiler/implementation/compile_time_constants.dart (revision 13496)
+++ lib/compiler/implementation/compile_time_constants.dart (working copy)
@@ -75,7 +75,7 @@
* Returns the a compile-time constant if the variable could be compiled
* eagerly. Otherwise returns `null`.
*/
- Constant compileVariable(VariableElement element, [bool isConst = false]) {
+ Constant compileVariable(VariableElement element, {bool isConst: false}) {
return measure(() {
if (initialVariableValues.containsKey(element)) {
Constant result = initialVariableValues[element];
@@ -96,7 +96,7 @@
*/
Constant compileVariableWithDefinitions(VariableElement element,
TreeElements definitions,
- [bool isConst = false]) {
+ {bool isConst: false}) {
return measure(() {
// Initializers for parameters must be const.
isConst = isConst || element.modifiers.isConst()
@@ -156,11 +156,11 @@
Constant compileNodeWithDefinitions(Node node,
TreeElements definitions,
- [bool isConst]) {
+ {bool isConst}) {
return measure(() {
assert(node !== null);
CompileTimeConstantEvaluator evaluator = new CompileTimeConstantEvaluator(
- constantSystem, definitions, compiler, isConst);
+ constantSystem, definitions, compiler, isConst: isConst);
return evaluator.evaluate(node);
});
}
@@ -248,7 +248,7 @@
CompileTimeConstantEvaluator(this.constantSystem,
this.elements,
this.compiler,
- [bool isConst])
+ {bool isConst})
: this.isEvaluatingConstant = isConst;
Constant evaluate(Node node) {

Powered by Google App Engine
This is Rietveld 408576698