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

Side by Side Diff: pkg/dartino_compiler/lib/src/lazy_field_initializer_codegen.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.lazy_field_initializer_codegen; 5 library dartino_compiler.lazy_field_initializer_codegen;
6 6
7 import 'package:compiler/src/elements/elements.dart'; 7 import 'package:compiler/src/elements/elements.dart';
8 import 'package:compiler/src/resolution/tree_elements.dart' show 8 import 'package:compiler/src/resolution/tree_elements.dart' show
9 TreeElements; 9 TreeElements;
10 10
11 import 'package:compiler/src/tree/tree.dart'; 11 import 'package:compiler/src/tree/tree.dart';
12 12
13 import 'fletch_context.dart'; 13 import 'dartino_context.dart';
14 14
15 import 'fletch_function_builder.dart' show 15 import 'dartino_function_builder.dart' show
16 FletchFunctionBuilder; 16 DartinoFunctionBuilder;
17 17
18 import 'fletch_registry.dart' show 18 import 'dartino_registry.dart' show
19 FletchRegistry; 19 DartinoRegistry;
20 20
21 import 'closure_environment.dart'; 21 import 'closure_environment.dart';
22 22
23 import 'codegen_visitor.dart'; 23 import 'codegen_visitor.dart';
24 24
25 class LazyFieldInitializerCodegen 25 class LazyFieldInitializerCodegen
26 extends CodegenVisitor with FletchRegistryMixin { 26 extends CodegenVisitor with DartinoRegistryMixin {
27 final FletchRegistry registry; 27 final DartinoRegistry registry;
28 28
29 LazyFieldInitializerCodegen(FletchFunctionBuilder functionBuilder, 29 LazyFieldInitializerCodegen(DartinoFunctionBuilder functionBuilder,
30 FletchContext context, 30 DartinoContext context,
31 TreeElements elements, 31 TreeElements elements,
32 this.registry, 32 this.registry,
33 ClosureEnvironment closureEnvironment, 33 ClosureEnvironment closureEnvironment,
34 FieldElement field) 34 FieldElement field)
35 : super(functionBuilder, context, elements, 35 : super(functionBuilder, context, elements,
36 closureEnvironment, field); 36 closureEnvironment, field);
37 37
38 FieldElement get field => element; 38 FieldElement get field => element;
39 39
40 void compile() { 40 void compile() {
41 Node initializer = field.initializer; 41 Node initializer = field.initializer;
42 visitForValue(initializer); 42 visitForValue(initializer);
43 // TODO(ajohnsen): Add cycle detection. 43 // TODO(ajohnsen): Add cycle detection.
44 assembler 44 assembler
45 ..storeStatic(context.getStaticFieldIndex(field, null)) 45 ..storeStatic(context.getStaticFieldIndex(field, null))
46 ..ret() 46 ..ret()
47 ..methodEnd(); 47 ..methodEnd();
48 } 48 }
49 } 49 }
OLDNEW
« no previous file with comments | « pkg/dartino_compiler/lib/src/hub/session_manager.dart ('k') | pkg/dartino_compiler/lib/src/message_examples.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698