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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2924803002: Avoid using FunctionSignature in builder_kernel (Closed)
Patch Set: Created 3 years, 6 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
8 import '../closure.dart'; 8 import '../closure.dart';
9 import '../common.dart'; 9 import '../common.dart';
10 import '../compiler.dart'; 10 import '../compiler.dart';
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 @override 212 @override
213 Local getLocal(ir.VariableDeclaration variable) { 213 Local getLocal(ir.VariableDeclaration variable) {
214 // If this is a synthetic local, return the synthetic local 214 // If this is a synthetic local, return the synthetic local
215 if (variable.name == null) { 215 if (variable.name == null) {
216 return _syntheticLocals.putIfAbsent( 216 return _syntheticLocals.putIfAbsent(
217 variable, () => new SyntheticLocal("x", null, null)); 217 variable, () => new SyntheticLocal("x", null, null));
218 } 218 }
219 return getElement(variable) as LocalElement; 219 return getElement(variable) as LocalElement;
220 } 220 }
221 221
222 FunctionSignature getFunctionSignature(ir.FunctionNode function) {
223 return getElement(function).asFunctionElement().functionSignature;
224 }
225
226 // Is the member a lazy initialized static or top-level member? 222 // Is the member a lazy initialized static or top-level member?
227 bool isLazyStatic(ir.Member member) { 223 bool isLazyStatic(ir.Member member) {
228 if (member is ir.Field) { 224 if (member is ir.Field) {
229 FieldElement field = _nodeToElement[member]; 225 FieldElement field = _nodeToElement[member];
230 return field.constant == null; 226 return field.constant == null;
231 } 227 }
232 return false; 228 return false;
233 } 229 }
234 230
235 KernelJumpTarget getJumpTarget(ir.TreeNode node, 231 KernelJumpTarget getJumpTarget(ir.TreeNode node,
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { 628 TypeMask selectorTypeOf(Selector selector, TypeMask mask) {
633 return TypeMaskFactory.inferredTypeForSelector( 629 return TypeMaskFactory.inferredTypeForSelector(
634 selector, mask, _globalInferenceResults); 630 selector, mask, _globalInferenceResults);
635 } 631 }
636 632
637 TypeMask typeFromNativeBehavior( 633 TypeMask typeFromNativeBehavior(
638 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { 634 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) {
639 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); 635 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld);
640 } 636 }
641 } 637 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698