OLD | NEW |
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 library sourcemap.js_tracer; | 5 library sourcemap.js_tracer; |
6 | 6 |
7 import 'package:compiler/src/io/source_information.dart'; | 7 import 'package:compiler/src/io/source_information.dart'; |
8 import 'package:compiler/src/io/position_information.dart'; | 8 import 'package:compiler/src/io/position_information.dart'; |
9 import 'package:compiler/src/js/js.dart' as js; | 9 import 'package:compiler/src/js/js.dart' as js; |
10 import 'sourcemap_helper.dart'; | 10 import 'sourcemap_helper.dart'; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 text = ['while(', whileNode.condition, ') ...']; | 75 text = ['while(', whileNode.condition, ') ...']; |
76 break; | 76 break; |
77 case StepKind.DO_CONDITION: | 77 case StepKind.DO_CONDITION: |
78 js.Do doNode = node; | 78 js.Do doNode = node; |
79 text = ['do {... } (', doNode.condition, ')']; | 79 text = ['do {... } (', doNode.condition, ')']; |
80 break; | 80 break; |
81 case StepKind.SWITCH_EXPRESSION: | 81 case StepKind.SWITCH_EXPRESSION: |
82 js.Switch switchNode = node; | 82 js.Switch switchNode = node; |
83 text = ['switch(', switchNode.key, ') ...']; | 83 text = ['switch(', switchNode.key, ') ...']; |
84 break; | 84 break; |
| 85 case StepKind.NO_INFO: |
| 86 break; |
85 } | 87 } |
86 createTraceStep(kind, node, | 88 createTraceStep(kind, node, |
87 offset: offset, | 89 offset: offset, |
88 sourceLocation: | 90 sourceLocation: |
89 getSourceLocation(sourceInformation, sourcePositionKind), | 91 getSourceLocation(sourceInformation, sourcePositionKind), |
90 text: text); | 92 text: text); |
91 } | 93 } |
92 | 94 |
93 void createTraceStep(StepKind kind, js.Node node, | 95 void createTraceStep(StepKind kind, js.Node node, |
94 {Offset offset, List text, String note, SourceLocation sourceLocation}) { | 96 {Offset offset, List text, String note, SourceLocation sourceLocation}) { |
(...skipping 29 matching lines...) Expand all Loading... |
124 branch = '$value'; | 126 branch = '$value'; |
125 break; | 127 break; |
126 } | 128 } |
127 graph.pushBranch(branch); | 129 graph.pushBranch(branch); |
128 } | 130 } |
129 | 131 |
130 void popBranch() { | 132 void popBranch() { |
131 graph.popBranch(); | 133 graph.popBranch(); |
132 } | 134 } |
133 } | 135 } |
OLD | NEW |