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

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

Issue 811763003: cps-ir: Give up on code generation of static getters and setters. (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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart ('k') | 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 List<js.Expression> arguments = visitArguments(node.arguments); 204 List<js.Expression> arguments = visitArguments(node.arguments);
205 205
206 String methodName = glue.invocationName(node.selector); 206 String methodName = glue.invocationName(node.selector);
207 registerMethodInvoke(node); 207 registerMethodInvoke(node);
208 208
209 return js.propertyCall(receiver, methodName, arguments); 209 return js.propertyCall(receiver, methodName, arguments);
210 } 210 }
211 211
212 @override 212 @override
213 js.Expression visitInvokeStatic(tree_ir.InvokeStatic node) { 213 js.Expression visitInvokeStatic(tree_ir.InvokeStatic node) {
214 if (node.target is! FunctionElement) {
215 giveup(node, 'static getters and setters are not supported.');
216 }
214 return buildStaticInvoke(node.selector, 217 return buildStaticInvoke(node.selector,
215 node.target, 218 node.target,
216 visitArguments(node.arguments)); 219 visitArguments(node.arguments));
217 } 220 }
218 221
219 @override 222 @override
220 js.Expression visitInvokeSuperMethod(tree_ir.InvokeSuperMethod node) { 223 js.Expression visitInvokeSuperMethod(tree_ir.InvokeSuperMethod node) {
221 return giveup(node); 224 return giveup(node);
222 // TODO: implement visitInvokeSuperMethod 225 // TODO: implement visitInvokeSuperMethod
223 } 226 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 accumulator.add( 413 accumulator.add(
411 buildWhile(new js.LiteralBool(true), node.body, node.label, node)); 414 buildWhile(new js.LiteralBool(true), node.body, node.label, node));
412 } 415 }
413 416
414 @override 417 @override
415 void visitReturn(tree_ir.Return node) { 418 void visitReturn(tree_ir.Return node) {
416 accumulator.add(new js.Return(visitExpression(node.value))); 419 accumulator.add(new js.Return(visitExpression(node.value)));
417 } 420 }
418 421
419 } 422 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698