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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 810243002: Support synthetic default constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
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 dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../constants/values.dart' show PrimitiveConstantValue; 8 import '../constants/values.dart' show PrimitiveConstantValue;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../dart2jslib.dart'; 10 import '../dart2jslib.dart';
11 import '../elements/elements.dart'; 11 import '../elements/elements.dart';
12 import '../source_file.dart'; 12 import '../source_file.dart';
13 import '../tree/tree.dart' as ast; 13 import '../tree/tree.dart' as ast;
14 import '../scanner/scannerlib.dart' show Token, isUserDefinableOperator; 14 import '../scanner/scannerlib.dart' show Token, isUserDefinableOperator;
15 import '../universe/universe.dart' show SelectorKind; 15 import '../universe/universe.dart' show SelectorKind;
16 import 'cps_ir_nodes.dart' as ir; 16 import 'cps_ir_nodes.dart' as ir;
17 import '../elements/modelx.dart' show SynthesizedConstructorElementX;
17 18
18 part 'cps_ir_builder_visitor.dart'; 19 part 'cps_ir_builder_visitor.dart';
19 20
20 /// A mapping from variable elements to their compile-time values. 21 /// A mapping from variable elements to their compile-time values.
21 /// 22 ///
22 /// Map elements denoted by parameters and local variables to the 23 /// Map elements denoted by parameters and local variables to the
23 /// [ir.Primitive] that is their value. Parameters and locals are 24 /// [ir.Primitive] that is their value. Parameters and locals are
24 /// assigned indexes which can be used to refer to them. 25 /// assigned indexes which can be used to refer to them.
25 class Environment { 26 class Environment {
26 /// A map from elements to their environment index. 27 /// A map from elements to their environment index.
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 index = 0; 1554 index = 0;
1554 for (int i = 0; i < environment.length; ++i) { 1555 for (int i = 0; i < environment.length; ++i) {
1555 if (common[i] == null) { 1556 if (common[i] == null) {
1556 environment.index2value[i] = parameters[index++]; 1557 environment.index2value[i] = parameters[index++];
1557 } 1558 }
1558 } 1559 }
1559 1560
1560 return join; 1561 return join;
1561 } 1562 }
1562 } 1563 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698