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

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

Issue 1450393002: Roll sdk dependency to 34357cdad108dcba734949bd13bd28c76ea285e0 (Closed) Base URL: git@github.com:dart-lang/fletch.git@master
Patch Set: rebase Created 5 years, 1 month 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.debug_info_function_codegen; 5 library fletchc.debug_info_function_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/resolution.dart'; 8 import 'package:compiler/src/resolution/tree_elements.dart';
9 import 'package:compiler/src/tree/tree.dart'; 9 import 'package:compiler/src/tree/tree.dart';
10 import 'package:compiler/src/universe/universe.dart'; 10 import 'package:compiler/src/universe/selector.dart';
11
12 import 'package:compiler/src/dart2jslib.dart' show
13 Registry;
14 11
15 import 'package:compiler/src/dart_types.dart' show 12 import 'package:compiler/src/dart_types.dart' show
16 DartType; 13 DartType;
17 14
18 import 'package:compiler/src/util/util.dart' show 15 import 'package:compiler/src/diagnostics/spannable.dart' show
19 Spannable; 16 Spannable;
20 17
21 import 'bytecode_assembler.dart'; 18 import 'bytecode_assembler.dart';
22 import 'closure_environment.dart'; 19 import 'closure_environment.dart';
23 import 'codegen_visitor.dart'; 20 import 'codegen_visitor.dart';
24 21
25 import 'fletch_function_builder.dart' show 22 import 'fletch_function_builder.dart' show
26 FletchFunctionBuilder; 23 FletchFunctionBuilder;
27 24
28 import 'fletch_registry.dart' show
29 FletchRegistry;
30
31 import 'debug_registry.dart' show 25 import 'debug_registry.dart' show
32 DebugRegistry; 26 DebugRegistry;
33 27
34 import 'fletch_context.dart'; 28 import 'fletch_context.dart';
35 import 'function_codegen.dart'; 29 import 'function_codegen.dart';
36 import 'debug_info.dart'; 30 import 'debug_info.dart';
37 31
38 class DebugInfoFunctionCodegen extends FunctionCodegen with DebugRegistry { 32 class DebugInfoFunctionCodegen extends FunctionCodegen with DebugRegistry {
39 final FletchCompilerImplementation compiler; 33 final FletchCompilerImplementation compiler;
40 final DebugInfo debugInfo; 34 final DebugInfo debugInfo;
41 35
42 DebugInfoFunctionCodegen(this.debugInfo, 36 DebugInfoFunctionCodegen(this.debugInfo,
43 FletchFunctionBuilder functionBuilder, 37 FletchFunctionBuilder functionBuilder,
44 FletchContext context, 38 FletchContext context,
45 TreeElements elements, 39 TreeElements elements,
46 FletchRegistry registry,
47 ClosureEnvironment closureEnvironment, 40 ClosureEnvironment closureEnvironment,
48 FunctionElement function, 41 FunctionElement function,
49 this.compiler) 42 this.compiler)
50 : super(functionBuilder, context, elements, registry, 43 : super(functionBuilder, context, elements, null,
51 closureEnvironment, function) { 44 closureEnvironment, function) {
52 if (functionBuilder.isInstanceMember) pushVariableDeclaration(thisValue); 45 if (functionBuilder.isInstanceMember) pushVariableDeclaration(thisValue);
53 } 46 }
54 47
55 void recordDebugInfo(Node node) { 48 void recordDebugInfo(Node node) {
56 debugInfo.addLocation(compiler, assembler.byteSize, node); 49 debugInfo.addLocation(compiler, assembler.byteSize, node);
57 } 50 }
58 51
59 void pushVariableDeclaration(LocalValue value) { 52 void pushVariableDeclaration(LocalValue value) {
60 super.pushVariableDeclaration(value); 53 super.pushVariableDeclaration(value);
(...skipping 11 matching lines...) Expand all
72 Spannable diagnosticLocation) { 65 Spannable diagnosticLocation) {
73 recordDebugInfo(node); 66 recordDebugInfo(node);
74 super.callIsSelector(node, type, diagnosticLocation); 67 super.callIsSelector(node, type, diagnosticLocation);
75 } 68 }
76 69
77 void invokeMethod(Node node, Selector selector) { 70 void invokeMethod(Node node, Selector selector) {
78 recordDebugInfo(node); 71 recordDebugInfo(node);
79 super.invokeMethod(node, selector); 72 super.invokeMethod(node, selector);
80 } 73 }
81 74
82 void invokeGetter(Node node, Selector selector) { 75 void invokeGetter(Node node, Name name) {
83 recordDebugInfo(node); 76 recordDebugInfo(node);
84 super.invokeGetter(node, selector); 77 super.invokeGetter(node, name);
85 } 78 }
86 79
87 void invokeSetter(Node node, Selector selector) { 80 void invokeSetter(Node node, Name name) {
88 recordDebugInfo(node); 81 recordDebugInfo(node);
89 super.invokeSetter(node, selector); 82 super.invokeSetter(node, name);
90 } 83 }
91 84
92 void invokeFactory(Node node, int constId, int arity) { 85 void invokeFactory(Node node, int constId, int arity) {
93 recordDebugInfo(node); 86 recordDebugInfo(node);
94 super.invokeFactory(node, constId, arity); 87 super.invokeFactory(node, constId, arity);
95 } 88 }
96 89
97 void invokeStatic(Node node, int constId, int arity) { 90 void invokeStatic(Node node, int constId, int arity) {
98 recordDebugInfo(node); 91 recordDebugInfo(node);
99 super.invokeStatic(node, constId, arity); 92 super.invokeStatic(node, constId, arity);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void visitForValue(Node node) { 139 void visitForValue(Node node) {
147 recordDebugInfo(node); 140 recordDebugInfo(node);
148 super.visitForValue(node); 141 super.visitForValue(node);
149 } 142 }
150 143
151 void visitForEffect(Node node) { 144 void visitForEffect(Node node) {
152 recordDebugInfo(node); 145 recordDebugInfo(node);
153 super.visitForEffect(node); 146 super.visitForEffect(node);
154 } 147 }
155 } 148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698