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

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

Issue 1294353002: dart2js CPS: Inline list.forEach. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Merge in tip of tree. Created 5 years, 4 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | 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 dart2js.ir_nodes_sexpr; 5 library dart2js.ir_nodes_sexpr;
6 6
7 import '../constants/values.dart'; 7 import '../constants/values.dart';
8 import '../util/util.dart'; 8 import '../util/util.dart';
9 import 'cps_ir_nodes.dart'; 9 import 'cps_ir_nodes.dart';
10 import '../universe/universe.dart' show Selector, CallStructure; 10 import '../universe/universe.dart' show Selector, CallStructure;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 String method = node.method.toString(); 330 String method = node.method.toString();
331 String receiver = access(node.receiver); 331 String receiver = access(node.receiver);
332 String args = node.arguments.map(access).join(' '); 332 String args = node.arguments.map(access).join(' ');
333 return '(ApplyBuiltinMethod $method $receiver ($args))'; 333 return '(ApplyBuiltinMethod $method $receiver ($args))';
334 } 334 }
335 335
336 String visitForeignCode(ForeignCode node) { 336 String visitForeignCode(ForeignCode node) {
337 String arguments = node.arguments.map(access).join(' '); 337 String arguments = node.arguments.map(access).join(' ');
338 String continuation = node.continuation == null ? '' 338 String continuation = node.continuation == null ? ''
339 : ' ${access(node.continuation)}'; 339 : ' ${access(node.continuation)}';
340 return '(JS ${node.type} ${node.codeTemplate} ($arguments)$continuation)'; 340 return '$indentation(JS "${node.codeTemplate.source}"'
341 ' ($arguments)$continuation)';
341 } 342 }
342 343
343 String visitGetLength(GetLength node) { 344 String visitGetLength(GetLength node) {
344 String object = access(node.object); 345 String object = access(node.object);
345 return '(GetLength $object)'; 346 return '(GetLength $object)';
346 } 347 }
347 348
348 String visitGetIndex(GetIndex node) { 349 String visitGetIndex(GetIndex node) {
349 String object = access(node.object); 350 String object = access(node.object);
350 String index = access(node.index); 351 String index = access(node.index);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 void setReturnContinuation(Continuation node) { 472 void setReturnContinuation(Continuation node) {
472 assert(!_names.containsKey(node) || _names[node] == 'return'); 473 assert(!_names.containsKey(node) || _names[node] == 'return');
473 _names[node] = 'return'; 474 _names[node] = 'return';
474 } 475 }
475 476
476 String getName(Node node) { 477 String getName(Node node) {
477 if (!_names.containsKey(node)) return 'MISSING_NAME'; 478 if (!_names.containsKey(node)) return 'MISSING_NAME';
478 return _names[node]; 479 return _names[node];
479 } 480 }
480 } 481 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698