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

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

Issue 2937203002: Add J-elements (Closed)
Patch Set: Updated cf. comments Created 3 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) 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 'builder_kernel.dart'; 8 import 'builder_kernel.dart';
9 import 'kernel_ast_adapter.dart'; 9 import 'kernel_ast_adapter.dart';
10 import 'nodes.dart'; 10 import 'nodes.dart';
11 11
12 /// Visits and concatenates the expressions in a string concatenation. 12 /// Visits and concatenates the expressions in a string concatenation.
13 class KernelStringBuilder extends ir.Visitor { 13 class KernelStringBuilder extends ir.Visitor {
14 final KernelSsaBuilder builder; 14 final KernelSsaGraphBuilder builder;
15 KernelAstAdapter get astAdapter => builder.astAdapter; 15 KernelAstAdapter get astAdapter => builder.astAdapter;
16 16
17 /// The string value generated so far. 17 /// The string value generated so far.
18 HInstruction result = null; 18 HInstruction result = null;
19 19
20 KernelStringBuilder(this.builder); 20 KernelStringBuilder(this.builder);
21 21
22 @override 22 @override
23 void defaultNode(ir.Node node) { 23 void defaultNode(ir.Node node) {
24 throw new SpannableAssertionFailure( 24 throw new SpannableAssertionFailure(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return instruction; 65 return instruction;
66 } 66 }
67 67
68 HInstruction stringify(HInstruction expression) { 68 HInstruction stringify(HInstruction expression) {
69 HInstruction instruction = 69 HInstruction instruction =
70 new HStringify(expression, builder.commonMasks.stringType); 70 new HStringify(expression, builder.commonMasks.stringType);
71 builder.add(instruction); 71 builder.add(instruction);
72 return instruction; 72 return instruction;
73 } 73 }
74 } 74 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | pkg/compiler/lib/src/ssa/loop_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698