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

Side by Side Diff: pkg/fletchc/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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE.md file.
4
5 library fletchc.debug_registry;
6
7 import 'package:compiler/src/universe/selector.dart' show
8 Selector;
9
10 import 'package:compiler/src/elements/elements.dart' show
11 ClassElement,
12 FieldElement,
13 FunctionElement,
14 LocalElement;
15
16 import 'package:compiler/src/dart_types.dart' show
17 DartType;
18
19 import 'package:compiler/src/diagnostics/spannable.dart' show
20 Spannable;
21
22 import 'package:compiler/src/universe/use.dart' show
23 DynamicUse,
24 StaticUse;
25
26 import 'fletch_context.dart' show
27 FletchContext;
28
29 import 'fletch_function_builder.dart' show
30 FletchFunctionBuilder;
31
32 /// Turns off enqueuing when generating debug information.
33 ///
34 /// We generate debug information for one element at the time, on
35 /// demand. Generating this information shouldn't interact with the
36 /// enqueuer/registry/tree-shaking algorithm.
37 abstract class DebugRegistry {
38 FletchContext get context;
39 FletchFunctionBuilder get functionBuilder;
40
41 void registerDynamicUse(Selector selector) { }
42 void registerDynamicGetter(Selector selector) { }
43 void registerDynamicSetter(Selector selector) { }
44 void registerStaticUse(StaticUse use) { }
45 void registerInstantiatedClass(ClassElement klass) { }
46 void registerIsCheck(DartType type) { }
47 void registerLocalInvoke(LocalElement element, Selector selector) { }
48 void registerClosurization(FunctionElement element, _) { }
49
50 int compileLazyFieldInitializer(FieldElement field) {
51 int index = context.getStaticFieldIndex(field, null);
52
53 if (field.initializer == null) return index;
54
55 if (context.backend.lazyFieldInitializers.containsKey(field)) return index;
56
57 context.compiler.reporter.internalError(
58 field, "not compiled before use in debugger");
59 throw null;
60 }
61
62 void generateUnimplementedError(Spannable spannable, String reason) {
63 context.backend.generateUnimplementedError(
64 spannable, reason, functionBuilder, suppressHint: true);
65 }
66 }
OLDNEW
« no previous file with comments | « pkg/fletchc/lib/src/debug_info_lazy_field_initializer_codegen.dart ('k') | pkg/fletchc/lib/src/device_type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698