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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2357513005: kernel->ssa: support string concatenations/interpolations (Closed)
Patch Set: fix Created 4 years, 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_string_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
9 import '../common/tasks.dart' show CompilerTask; 9 import '../common/tasks.dart' show CompilerTask;
10 import '../compiler.dart'; 10 import '../compiler.dart';
11 import '../dart_types.dart'; 11 import '../dart_types.dart';
12 import '../elements/elements.dart'; 12 import '../elements/elements.dart';
13 import '../io/source_information.dart'; 13 import '../io/source_information.dart';
14 import '../js_backend/backend.dart' show JavaScriptBackend; 14 import '../js_backend/backend.dart' show JavaScriptBackend;
15 import '../kernel/kernel.dart'; 15 import '../kernel/kernel.dart';
16 import '../tree/dartstring.dart'; 16 import '../tree/dartstring.dart';
17 import '../types/masks.dart'; 17 import '../types/masks.dart';
18 import '../universe/selector.dart'; 18 import '../universe/selector.dart';
19 19
20 import 'graph_builder.dart'; 20 import 'graph_builder.dart';
21 import 'kernel_ast_adapter.dart'; 21 import 'kernel_ast_adapter.dart';
22 import 'kernel_string_builder.dart';
22 import 'locals_handler.dart'; 23 import 'locals_handler.dart';
23 import 'nodes.dart'; 24 import 'nodes.dart';
24 import 'ssa_branch_builder.dart'; 25 import 'ssa_branch_builder.dart';
25 26
26 class SsaKernelBuilderTask extends CompilerTask { 27 class SsaKernelBuilderTask extends CompilerTask {
27 final JavaScriptBackend backend; 28 final JavaScriptBackend backend;
28 final SourceInformationStrategy sourceInformationFactory; 29 final SourceInformationStrategy sourceInformationFactory;
29 30
30 String get name => 'SSA kernel builder'; 31 String get name => 'SSA kernel builder';
31 32
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 @override 559 @override
559 void visitThisExpression(ir.ThisExpression thisExpression) { 560 void visitThisExpression(ir.ThisExpression thisExpression) {
560 stack.add(localsHandler.readThis()); 561 stack.add(localsHandler.readThis());
561 } 562 }
562 563
563 @override 564 @override
564 void visitNot(ir.Not not) { 565 void visitNot(ir.Not not) {
565 not.operand.accept(this); 566 not.operand.accept(this);
566 push(new HNot(popBoolified(), backend.boolType)); 567 push(new HNot(popBoolified(), backend.boolType));
567 } 568 }
569
570 @override
571 void visitStringConcatenation(ir.StringConcatenation stringConcat) {
572 KernelStringBuilder stringBuilder = new KernelStringBuilder(this);
573 stringConcat.accept(stringBuilder);
574 stack.add(stringBuilder.result);
575 }
568 } 576 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_string_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698