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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/tree_ir_builder.dart

Issue 574683002: Use ConstExp for storing constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 2 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 tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../dart2jslib.dart' as dart2js; 7 import '../dart2jslib.dart' as dart2js;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
10 import 'tree_ir_nodes.dart'; 10 import 'tree_ir_nodes.dart';
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 thenStatement = 402 thenStatement =
403 cont.hasExactlyOneUse ? visit(cont.body) : new Break(labels[cont]); 403 cont.hasExactlyOneUse ? visit(cont.body) : new Break(labels[cont]);
404 cont = node.falseContinuation.definition; 404 cont = node.falseContinuation.definition;
405 assert(cont.parameters.isEmpty); 405 assert(cont.parameters.isEmpty);
406 elseStatement = 406 elseStatement =
407 cont.hasExactlyOneUse ? visit(cont.body) : new Break(labels[cont]); 407 cont.hasExactlyOneUse ? visit(cont.body) : new Break(labels[cont]);
408 return new If(condition, thenStatement, elseStatement); 408 return new If(condition, thenStatement, elseStatement);
409 } 409 }
410 410
411 Expression visitConstant(cps_ir.Constant node) { 411 Expression visitConstant(cps_ir.Constant node) {
412 return new Constant(node.expression, node.value); 412 return new Constant(node.expression);
413 } 413 }
414 414
415 Expression visitThis(cps_ir.This node) { 415 Expression visitThis(cps_ir.This node) {
416 return new This(); 416 return new This();
417 } 417 }
418 418
419 Expression visitReifyTypeVar(cps_ir.ReifyTypeVar node) { 419 Expression visitReifyTypeVar(cps_ir.ReifyTypeVar node) {
420 return new ReifyTypeVar(node.typeVariable); 420 return new ReifyTypeVar(node.typeVariable);
421 } 421 }
422 422
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // visited. 462 // visited.
463 compiler.internalError(compiler.currentElement, 'Unexpected IR node.'); 463 compiler.internalError(compiler.currentElement, 'Unexpected IR node.');
464 return null; 464 return null;
465 } 465 }
466 466
467 Expression visitIsTrue(cps_ir.IsTrue node) { 467 Expression visitIsTrue(cps_ir.IsTrue node) {
468 return getVariableReference(node.value); 468 return getVariableReference(node.value);
469 } 469 }
470 } 470 }
471 471
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698