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

Side by Side Diff: pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart

Issue 1855643002: More strong mode changes to analysis_server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout changes to options file Created 4 years, 8 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 input.transformer.instrumentation; 5 library input.transformer.instrumentation;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/instrumentation/instrumentation.dart'; 9 import 'package:analyzer/instrumentation/instrumentation.dart';
10 import 'package:analyzer/src/generated/java_engine.dart'; 10 import 'package:analyzer/src/generated/java_engine.dart';
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 if (codesSeen.add(opCode)) { 90 if (codesSeen.add(opCode)) {
91 logger.log( 91 logger.log(
92 Level.WARNING, 'Ignored instrumentation op code: $opCode\n $line'); 92 Level.WARNING, 'Ignored instrumentation op code: $opCode\n $line');
93 } 93 }
94 return null; 94 return null;
95 } 95 }
96 96
97 Map<String, dynamic> decodeJson(String line, String text) { 97 Map<String, dynamic> decodeJson(String line, String text) {
98 try { 98 try {
99 return JSON.decode(text); 99 return asMap(JSON.decode(text));
100 } catch (e, s) { 100 } catch (e, s) {
101 throw new AnalysisException( 101 throw new AnalysisException(
102 'Failed to decode JSON: $text\n$line', new CaughtException(e, s)); 102 'Failed to decode JSON: $text\n$line', new CaughtException(e, s));
103 } 103 }
104 } 104 }
105 105
106 /** 106 /**
107 * Determine if the given line is from an instrumentation file. 107 * Determine if the given line is from an instrumentation file.
108 * For example: 108 * For example:
109 * `1433175833005:Ver:1421765742287333878467:org.dartlang.dartplugin:0.0.0:1.6 .2:1.11.0-edge.131698` 109 * `1433175833005:Ver:1421765742287333878467:org.dartlang.dartplugin:0.0.0:1.6 .2:1.11.0-edge.131698`
(...skipping 29 matching lines...) Expand all
139 sb.writeCharCode(code); 139 sb.writeCharCode(code);
140 } 140 }
141 ++index; 141 ++index;
142 } 142 }
143 if (sb.isNotEmpty) { 143 if (sb.isNotEmpty) {
144 fields.add(sb.toString()); 144 fields.add(sb.toString());
145 } 145 }
146 return fields; 146 return fields;
147 } 147 }
148 } 148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698