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

Side by Side Diff: pkg/dartino_compiler/lib/src/debug_registry.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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 dartino_compiler.debug_registry;
6 6
7 import 'package:compiler/src/universe/selector.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/diagnostics/spannable.dart' show 19 import 'package:compiler/src/diagnostics/spannable.dart' show
20 Spannable; 20 Spannable;
21 21
22 import 'package:compiler/src/universe/use.dart' show 22 import 'package:compiler/src/universe/use.dart' show
23 DynamicUse, 23 DynamicUse,
24 StaticUse; 24 StaticUse;
25 25
26 import 'fletch_context.dart' show 26 import 'dartino_context.dart' show
27 FletchContext; 27 DartinoContext;
28 28
29 import 'fletch_function_builder.dart' show 29 import 'dartino_function_builder.dart' show
30 FletchFunctionBuilder; 30 DartinoFunctionBuilder;
31 31
32 /// Turns off enqueuing when generating debug information. 32 /// Turns off enqueuing when generating debug information.
33 /// 33 ///
34 /// We generate debug information for one element at the time, on 34 /// We generate debug information for one element at the time, on
35 /// demand. Generating this information shouldn't interact with the 35 /// demand. Generating this information shouldn't interact with the
36 /// enqueuer/registry/tree-shaking algorithm. 36 /// enqueuer/registry/tree-shaking algorithm.
37 abstract class DebugRegistry { 37 abstract class DebugRegistry {
38 FletchContext get context; 38 DartinoContext get context;
39 FletchFunctionBuilder get functionBuilder; 39 DartinoFunctionBuilder get functionBuilder;
40 40
41 void registerDynamicUse(Selector selector) { } 41 void registerDynamicUse(Selector selector) { }
42 void registerDynamicGetter(Selector selector) { } 42 void registerDynamicGetter(Selector selector) { }
43 void registerDynamicSetter(Selector selector) { } 43 void registerDynamicSetter(Selector selector) { }
44 void registerStaticUse(StaticUse use) { } 44 void registerStaticUse(StaticUse use) { }
45 void registerInstantiatedClass(ClassElement klass) { } 45 void registerInstantiatedClass(ClassElement klass) { }
46 void registerIsCheck(DartType type) { } 46 void registerIsCheck(DartType type) { }
47 void registerLocalInvoke(LocalElement element, Selector selector) { } 47 void registerLocalInvoke(LocalElement element, Selector selector) { }
48 void registerClosurization(FunctionElement element, _) { } 48 void registerClosurization(FunctionElement element, _) { }
49 49
50 int compileLazyFieldInitializer(FieldElement field) { 50 int compileLazyFieldInitializer(FieldElement field) {
51 int index = context.getStaticFieldIndex(field, null); 51 int index = context.getStaticFieldIndex(field, null);
52 52
53 if (field.initializer == null) return index; 53 if (field.initializer == null) return index;
54 54
55 if (context.backend.lazyFieldInitializers.containsKey(field)) return index; 55 if (context.backend.lazyFieldInitializers.containsKey(field)) return index;
56 56
57 context.compiler.reporter.internalError( 57 context.compiler.reporter.internalError(
58 field, "not compiled before use in debugger"); 58 field, "not compiled before use in debugger");
59 throw null; 59 throw null;
60 } 60 }
61 61
62 void generateUnimplementedError(Spannable spannable, String reason) { 62 void generateUnimplementedError(Spannable spannable, String reason) {
63 context.backend.generateUnimplementedError( 63 context.backend.generateUnimplementedError(
64 spannable, reason, functionBuilder, suppressHint: true); 64 spannable, reason, functionBuilder, suppressHint: true);
65 } 65 }
66 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698