Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.debug_registry; | 5 library fletchc.debug_registry; |
| 6 | 6 |
| 7 import 'package:compiler/src/universe/universe.dart' show | 7 import 'package:compiler/src/universe/selector.dart' show |
| 8 Selector; | 8 Selector; |
| 9 | 9 |
| 10 import 'package:compiler/src/elements/elements.dart' show | 10 import 'package:compiler/src/elements/elements.dart' show |
| 11 ClassElement, | 11 ClassElement, |
| 12 FieldElement, | 12 FieldElement, |
| 13 FunctionElement, | 13 FunctionElement, |
| 14 LocalElement; | 14 LocalElement; |
| 15 | 15 |
| 16 import 'package:compiler/src/dart_types.dart' show | 16 import 'package:compiler/src/dart_types.dart' show |
| 17 DartType; | 17 DartType; |
| 18 | 18 |
| 19 import 'package:compiler/src/util/util.dart' show | 19 import 'package:compiler/src/diagnostics/spannable.dart' show |
| 20 Spannable; | 20 Spannable; |
| 21 | 21 |
| 22 import 'fletch_context.dart' show | 22 import 'fletch_context.dart' show |
| 23 FletchContext; | 23 FletchContext; |
| 24 | 24 |
| 25 import 'fletch_function_builder.dart' show | 25 import 'fletch_function_builder.dart' show |
| 26 FletchFunctionBuilder; | 26 FletchFunctionBuilder; |
| 27 | 27 |
| 28 /// Turns off enqueuing when generating debug information. | 28 /// Turns off enqueuing when generating debug information. |
| 29 /// | 29 /// |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 43 void registerLocalInvoke(LocalElement element, Selector selector) { } | 43 void registerLocalInvoke(LocalElement element, Selector selector) { } |
| 44 void registerClosurization(FunctionElement element, _) { } | 44 void registerClosurization(FunctionElement element, _) { } |
| 45 | 45 |
| 46 int compileLazyFieldInitializer(FieldElement field) { | 46 int compileLazyFieldInitializer(FieldElement field) { |
| 47 int index = context.getStaticFieldIndex(field, null); | 47 int index = context.getStaticFieldIndex(field, null); |
| 48 | 48 |
| 49 if (field.initializer == null) return index; | 49 if (field.initializer == null) return index; |
| 50 | 50 |
| 51 if (context.backend.lazyFieldInitializers.containsKey(field)) return index; | 51 if (context.backend.lazyFieldInitializers.containsKey(field)) return index; |
| 52 | 52 |
| 53 context.compiler.internalError( | 53 context.compiler.reporter.internalError( |
| 54 field, "not compiled before use in debugger"); | 54 field, "not compiled before use in debugger"); |
| 55 return null; | |
|
ahe
2015/11/17 16:44:08
Throw instead?
sigurdm
2015/11/19 14:33:46
Done.
| |
| 55 } | 56 } |
| 56 | 57 |
| 57 void generateUnimplementedError(Spannable spannable, String reason) { | 58 void generateUnimplementedError(Spannable spannable, String reason) { |
| 58 context.backend.generateUnimplementedError( | 59 context.backend.generateUnimplementedError( |
| 59 spannable, reason, functionBuilder, suppressHint: true); | 60 spannable, reason, functionBuilder, suppressHint: true); |
| 60 } | 61 } |
| 61 } | 62 } |
| OLD | NEW |