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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 735253003: Add CPS IR transformation to make the JavaScript backend specific semantics explicit in the tree. (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
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 tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../dart2jslib.dart' as dart2js; 7 import '../dart2jslib.dart' as dart2js;
8 import '../dart_types.dart'; 8 import '../dart_types.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 Expression visitContinuation(cps_ir.Continuation node) { 466 Expression visitContinuation(cps_ir.Continuation node) {
467 // Until continuations with multiple uses are supported, they are not 467 // Until continuations with multiple uses are supported, they are not
468 // visited. 468 // visited.
469 compiler.internalError(compiler.currentElement, 'Unexpected IR node.'); 469 compiler.internalError(compiler.currentElement, 'Unexpected IR node.');
470 return null; 470 return null;
471 } 471 }
472 472
473 Expression visitIsTrue(cps_ir.IsTrue node) { 473 Expression visitIsTrue(cps_ir.IsTrue node) {
474 return getVariableReference(node.value); 474 return getVariableReference(node.value);
475 } 475 }
476
477 dart2js.Selector get identicalSelector {
478 return new dart2js.Selector.call('identical', null, 2);
479 }
480
481 Expression visitIdentical(cps_ir.Identical node) {
482 return new InvokeStatic(
483 compiler.identicalFunction,
484 identicalSelector,
485 <Expression>[getVariableReference(node.left),
486 getVariableReference(node.right)]);
487 }
476 } 488 }
477 489
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698