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

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

Issue 1204733002: dart2js cps: Make Identical a built-in and add Interceptor to Tree IR. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return '(CreateBox)'; 292 return '(CreateBox)';
293 } 293 }
294 294
295 String visitCreateInstance(CreateInstance node) { 295 String visitCreateInstance(CreateInstance node) {
296 String className = node.classElement.name; 296 String className = node.classElement.name;
297 String arguments = node.arguments.map(access).join(' '); 297 String arguments = node.arguments.map(access).join(' ');
298 String typeInformation = node.typeInformation.map(access).join(' '); 298 String typeInformation = node.typeInformation.map(access).join(' ');
299 return '(CreateInstance $className ($arguments)$typeInformation)'; 299 return '(CreateInstance $className ($arguments)$typeInformation)';
300 } 300 }
301 301
302 String visitIdentical(Identical node) {
303 String left = access(node.left);
304 String right = access(node.right);
305 return '(Identical $left $right)';
306 }
307
308 String visitInterceptor(Interceptor node) { 302 String visitInterceptor(Interceptor node) {
309 return '(Interceptor ${access(node.input)})'; 303 return '(Interceptor ${access(node.input)})';
310 } 304 }
311 305
312 String visitReifyRuntimeType(ReifyRuntimeType node) { 306 String visitReifyRuntimeType(ReifyRuntimeType node) {
313 return '(ReifyRuntimeType ${access(node.value)})'; 307 return '(ReifyRuntimeType ${access(node.value)})';
314 } 308 }
315 309
316 String visitReadTypeVariable(ReadTypeVariable node) { 310 String visitReadTypeVariable(ReadTypeVariable node) {
317 return '(ReadTypeVariable ${access(node.target)}.${node.variable})'; 311 return '(ReadTypeVariable ${access(node.target)}.${node.variable})';
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void setReturnContinuation(Continuation node) { 447 void setReturnContinuation(Continuation node) {
454 assert(!_names.containsKey(node) || _names[node] == 'return'); 448 assert(!_names.containsKey(node) || _names[node] == 'return');
455 _names[node] = 'return'; 449 _names[node] = 'return';
456 } 450 }
457 451
458 String getName(Node node) { 452 String getName(Node node) {
459 if (!_names.containsKey(node)) return 'MISSING_NAME'; 453 if (!_names.containsKey(node)) return 'MISSING_NAME';
460 return _names[node]; 454 return _names[node];
461 } 455 }
462 } 456 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698