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

Side by Side Diff: pkg/compiler/lib/src/js_backend/codegen/codegen.dart

Issue 739883002: `this` in js-cps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add todo Created 6 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 code_generator; 5 library code_generator;
6 6
7 import 'glue.dart'; 7 import 'glue.dart';
8 8
9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; 9 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
10 import '../../js/js.dart' as js; 10 import '../../js/js.dart' as js;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 193 }
194 194
195 @override 195 @override
196 js.Expression visitReifyTypeVar(tree_ir.ReifyTypeVar node) { 196 js.Expression visitReifyTypeVar(tree_ir.ReifyTypeVar node) {
197 return giveup(node); 197 return giveup(node);
198 // TODO: implement visitReifyTypeVar 198 // TODO: implement visitReifyTypeVar
199 } 199 }
200 200
201 @override 201 @override
202 js.Expression visitThis(tree_ir.This node) { 202 js.Expression visitThis(tree_ir.This node) {
203 return giveup(node); 203 // TODO(sigurdm): Inside a js closure this will not work.
204 // TODO: implement visitThis 204 return new js.This();
205 } 205 }
206 206
207 @override 207 @override
208 js.Expression visitTypeOperator(tree_ir.TypeOperator node) { 208 js.Expression visitTypeOperator(tree_ir.TypeOperator node) {
209 return giveup(node); 209 return giveup(node);
210 // TODO: implement visitTypeOperator 210 // TODO: implement visitTypeOperator
211 } 211 }
212 212
213 @override 213 @override
214 js.Expression visitVariable(tree_ir.Variable node) { 214 js.Expression visitVariable(tree_ir.Variable node) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 @override 283 @override
284 void visitReturn(tree_ir.Return node) { 284 void visitReturn(tree_ir.Return node) {
285 if (node.value != null) { 285 if (node.value != null) {
286 accumulator.add(new js.Return(visitExpression(node.value))); 286 accumulator.add(new js.Return(visitExpression(node.value)));
287 } 287 }
288 } 288 }
289 289
290 bool isNullLiteral(js.Expression exp) => exp is js.LiteralNull; 290 bool isNullLiteral(js.Expression exp) => exp is js.LiteralNull;
291 291
292 } 292 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698