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

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

Issue 891343002: Some minor fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 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 10
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 String nameParameter(Parameter parameter) { 346 String nameParameter(Parameter parameter) {
347 assert(!_names.containsKey(parameter)); 347 assert(!_names.containsKey(parameter));
348 return _names[parameter] = parameter.hint.name; 348 return _names[parameter] = parameter.hint.name;
349 } 349 }
350 350
351 String nameClosureVariable(ClosureVariable variable) { 351 String nameClosureVariable(ClosureVariable variable) {
352 assert(!_names.containsKey(variable)); 352 assert(!_names.containsKey(variable));
353 return _names[variable] = variable.hint.name; 353 return _names[variable] = variable.hint.name;
354 } 354 }
355 355
356 String nameClosureVariableIfAbsent(ClosureVariable variable) { 356 void nameClosureVariableIfAbsent(ClosureVariable variable) {
357 if (!_names.containsKey(variable)) { 357 if (!_names.containsKey(variable)) {
358 _names[variable] = variable.hint.name; 358 _names[variable] = variable.hint.name;
359 } 359 }
360 } 360 }
361 361
362 String nameContinuation(Continuation node) { 362 String nameContinuation(Continuation node) {
363 assert(!_names.containsKey(node)); 363 assert(!_names.containsKey(node));
364 return _names[node] = 'k${_continuationCounter++}'; 364 return _names[node] = 'k${_continuationCounter++}';
365 } 365 }
366 366
367 String nameValue(Primitive node) { 367 String nameValue(Primitive node) {
368 assert(!_names.containsKey(node)); 368 assert(!_names.containsKey(node));
369 return _names[node] = 'v${_valueCounter++}'; 369 return _names[node] = 'v${_valueCounter++}';
370 } 370 }
371 371
372 void setReturnContinuation(Continuation node) { 372 void setReturnContinuation(Continuation node) {
373 assert(!_names.containsKey(node) || _names[node] == 'return'); 373 assert(!_names.containsKey(node) || _names[node] == 'return');
374 _names[node] = 'return'; 374 _names[node] = 'return';
375 } 375 }
376 376
377 String getName(Node node) { 377 String getName(Node node) {
378 assert(_names.containsKey(node)); 378 assert(_names.containsKey(node));
379 return _names[node]; 379 return _names[node];
380 } 380 }
381 } 381 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698