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

Side by Side Diff: pkg/fletchc/lib/src/fletch_compiler_implementation.dart

Issue 1345213002: Request bug report if fletch crashes (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: Merged with cee917ffdd0c5be942d6eed129c766c1801ed9b8 Created 5 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
OLDNEW
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Fletch 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library fletchc.fletch_compiler_implementation; 5 library fletchc.fletch_compiler_implementation;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 EventSink; 8 EventSink;
9 9
10 import 'package:sdk_library_metadata/libraries.dart' show 10 import 'package:sdk_library_metadata/libraries.dart' show
(...skipping 24 matching lines...) Expand all
35 Message, 35 Message,
36 MessageKind, 36 MessageKind,
37 MessageTemplate; 37 MessageTemplate;
38 38
39 import 'package:compiler/src/util/util.dart' show 39 import 'package:compiler/src/util/util.dart' show
40 Spannable; 40 Spannable;
41 41
42 import 'fletch_registry.dart' show 42 import 'fletch_registry.dart' show
43 FletchRegistry; 43 FletchRegistry;
44 44
45 import 'please_report_crash.dart' show
46 crashReportRequested,
47 requestBugReportOnCompilerCrashMessage;
48
45 import 'fletch_function_builder.dart'; 49 import 'fletch_function_builder.dart';
46 import 'debug_info.dart'; 50 import 'debug_info.dart';
47 import 'find_position_visitor.dart'; 51 import 'find_position_visitor.dart';
48 import 'fletch_context.dart'; 52 import 'fletch_context.dart';
49 53
50 import '../fletch_system.dart'; 54 import '../fletch_system.dart';
51 55
52 const EXTRA_DART2JS_OPTIONS = const <String>[ 56 const EXTRA_DART2JS_OPTIONS = const <String>[
53 // TODO(ahe): This doesn't completely disable type inference. Investigate. 57 // TODO(ahe): This doesn't completely disable type inference. Investigate.
54 '--disable-type-inference', 58 '--disable-type-inference',
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 String message, 272 String message,
269 {bool forceVerbose: false}) { 273 {bool forceVerbose: false}) {
270 // TODO(johnniwinther): Use super.reportVerboseInfo once added. 274 // TODO(johnniwinther): Use super.reportVerboseInfo once added.
271 if (forceVerbose || verbose) { 275 if (forceVerbose || verbose) {
272 MessageTemplate template = MessageTemplate.TEMPLATES[MessageKind.GENERIC]; 276 MessageTemplate template = MessageTemplate.TEMPLATES[MessageKind.GENERIC];
273 reportDiagnostic( 277 reportDiagnostic(
274 node, template.message({'text': message}, true), api.Diagnostic.HINT); 278 node, template.message({'text': message}, true), api.Diagnostic.HINT);
275 } 279 }
276 } 280 }
277 281
282 void pleaseReportCrash() {
283 crashReportRequested = true;
284 print(requestBugReportOnCompilerCrashMessage);
285 }
286
278 void reportError( 287 void reportError(
279 Spannable node, 288 Spannable node,
280 MessageKind messageKind, 289 MessageKind messageKind,
281 [Map arguments = const {}]) { 290 [Map arguments = const {}]) {
282 if (messageKind == MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND) { 291 if (messageKind == MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND) {
283 const String noMirrors = 292 const String noMirrors =
284 "Fletch doesn't support 'dart:mirrors'. See https://goo.gl/Kwrd0O"; 293 "Fletch doesn't support 'dart:mirrors'. See https://goo.gl/Kwrd0O";
285 messageKind = MessageKind.GENERIC; 294 messageKind = MessageKind.GENERIC;
286 arguments = {'text': noMirrors}; 295 arguments = {'text': noMirrors};
287 } 296 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 336 }
328 } 337 }
329 338
330 SourceFile getSourceFile(api.CompilerInput provider, Uri uri) { 339 SourceFile getSourceFile(api.CompilerInput provider, Uri uri) {
331 if (provider is SourceFileProvider) { 340 if (provider is SourceFileProvider) {
332 return provider.sourceFiles[uri]; 341 return provider.sourceFiles[uri];
333 } else { 342 } else {
334 return null; 343 return null;
335 } 344 }
336 } 345 }
OLDNEW
« no previous file with comments | « pkg/fletchc/lib/src/driver/driver_main.dart ('k') | pkg/fletchc/lib/src/please_report_crash.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698