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

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

Issue 693803003: Move continueWithExpression to IrBuilder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment. Created 6 years, 1 month 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 Statement visitDeclareFunction(cps_ir.DeclareFunction node) { 341 Statement visitDeclareFunction(cps_ir.DeclareFunction node) {
342 Variable variable = getClosureVariable(node.variable); 342 Variable variable = getClosureVariable(node.variable);
343 FunctionDefinition function = makeSubFunction(node.definition); 343 FunctionDefinition function = makeSubFunction(node.definition);
344 return new FunctionDeclaration(variable, function, visit(node.body)); 344 return new FunctionDeclaration(variable, function, visit(node.body));
345 } 345 }
346 346
347 Statement visitTypeOperator(cps_ir.TypeOperator node) { 347 Statement visitTypeOperator(cps_ir.TypeOperator node) {
348 Expression receiver = getVariableReference(node.receiver); 348 Expression receiver = getVariableReference(node.receiver);
349 Expression concat = new TypeOperator(receiver, node.type, node.operator); 349 Expression concat =
350 new TypeOperator(receiver, node.type, isTypeTest: node.isTypeTest);
350 return continueWithExpression(node.continuation, concat); 351 return continueWithExpression(node.continuation, concat);
351 } 352 }
352 353
353 Statement visitInvokeConstructor(cps_ir.InvokeConstructor node) { 354 Statement visitInvokeConstructor(cps_ir.InvokeConstructor node) {
354 List<Expression> arguments = translateArguments(node.arguments); 355 List<Expression> arguments = translateArguments(node.arguments);
355 Expression invoke = 356 Expression invoke =
356 new InvokeConstructor(node.type, node.target, node.selector, arguments); 357 new InvokeConstructor(node.type, node.target, node.selector, arguments);
357 return continueWithExpression(node.continuation, invoke); 358 return continueWithExpression(node.continuation, invoke);
358 } 359 }
359 360
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // visited. 468 // visited.
468 compiler.internalError(compiler.currentElement, 'Unexpected IR node.'); 469 compiler.internalError(compiler.currentElement, 'Unexpected IR node.');
469 return null; 470 return null;
470 } 471 }
471 472
472 Expression visitIsTrue(cps_ir.IsTrue node) { 473 Expression visitIsTrue(cps_ir.IsTrue node) {
473 return getVariableReference(node.value); 474 return getVariableReference(node.value);
474 } 475 }
475 } 476 }
476 477
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698