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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1134063002: dart2js cps: Introduce GetStatic/SetStatic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file Created 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../dart2jslib.dart' as dart2js; 7 import '../dart2jslib.dart' as dart2js;
8 import '../dart_types.dart'; 8 import '../dart_types.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 Expression visitReadTypeVariable(cps_ir.ReadTypeVariable node) { 655 Expression visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
656 return new ReadTypeVariable(node.variable, getVariableUse(node.target)); 656 return new ReadTypeVariable(node.variable, getVariableUse(node.target));
657 } 657 }
658 658
659 @override 659 @override
660 Node visitTypeExpression(cps_ir.TypeExpression node) { 660 Node visitTypeExpression(cps_ir.TypeExpression node) {
661 return new TypeExpression( 661 return new TypeExpression(
662 node.dartType, 662 node.dartType,
663 node.arguments.map(getVariableUse).toList()); 663 node.arguments.map(getVariableUse).toList());
664 } 664 }
665
666 Expression visitGetStatic(cps_ir.GetStatic node) {
667 return new GetStatic(node.element, node.sourceInformation);
668 }
669
670 Statement visitSetStatic(cps_ir.SetStatic node) {
671 SetStatic setStatic = new SetStatic(
672 node.element,
673 getVariableUse(node.value),
674 node.sourceInformation);
675 return new ExpressionStatement(setStatic, visit(node.body));
676 }
665 } 677 }
666 678
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698