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

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

Issue 2981423003: Move .getLocalFunction from KernelToElementMap to KernelToLocalsMap (Closed)
Patch Set: Updated cf. comments Created 3 years, 4 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 void assertNodeIsSynthetic(ir.Node node) { 255 void assertNodeIsSynthetic(ir.Node node) {
256 assert( 256 assert(
257 kernel.syntheticNodes.contains(node), 257 kernel.syntheticNodes.contains(node),
258 failedAt( 258 failedAt(
259 CURRENT_ELEMENT_SPANNABLE, "No synthetic marker found for $node")); 259 CURRENT_ELEMENT_SPANNABLE, "No synthetic marker found for $node"));
260 } 260 }
261 261
262 @override 262 @override
263 Local getLocal(ir.VariableDeclaration variable) { 263 Local getLocalVariable(ir.VariableDeclaration variable) {
264 // If this is a synthetic local, return the synthetic local 264 // If this is a synthetic local, return the synthetic local
265 if (variable.name == null) { 265 if (variable.name == null) {
266 return _syntheticLocals.putIfAbsent( 266 return _syntheticLocals.putIfAbsent(
267 variable, () => new SyntheticLocal("x", null, null)); 267 variable, () => new SyntheticLocal("x", null, null));
268 } 268 }
269 return getElement(variable) as LocalElement; 269 return getElement(variable) as LocalElement;
270 } 270 }
271 271
272 @override 272 @override
273 JumpTarget getJumpTargetForBreak(ir.BreakStatement node) { 273 JumpTarget getJumpTargetForBreak(ir.BreakStatement node) {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { 710 TypeMask selectorTypeOf(Selector selector, TypeMask mask) {
711 return TypeMaskFactory.inferredTypeForSelector( 711 return TypeMaskFactory.inferredTypeForSelector(
712 selector, mask, _globalInferenceResults); 712 selector, mask, _globalInferenceResults);
713 } 713 }
714 714
715 TypeMask typeFromNativeBehavior( 715 TypeMask typeFromNativeBehavior(
716 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { 716 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) {
717 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); 717 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld);
718 } 718 }
719 } 719 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698