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

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

Issue 2685783003: Fix access to returnTypeOf (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | no next file » | 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: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 '../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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 variable, () => new SyntheticLocal("x", null)); 169 variable, () => new SyntheticLocal("x", null));
170 } 170 }
171 return getElement(variable) as LocalElement; 171 return getElement(variable) as LocalElement;
172 } 172 }
173 173
174 bool getCanThrow(ir.Node procedure, ClosedWorld closedWorld) { 174 bool getCanThrow(ir.Node procedure, ClosedWorld closedWorld) {
175 FunctionElement function = getElement(procedure); 175 FunctionElement function = getElement(procedure);
176 return !closedWorld.getCannotThrow(function); 176 return !closedWorld.getCannotThrow(function);
177 } 177 }
178 178
179 TypeMask returnTypeOf(ir.Member node) { 179 TypeMask returnTypeOf(ir.Procedure node) {
180 return TypeMaskFactory.inferredReturnTypeForElement( 180 return TypeMaskFactory.inferredReturnTypeForElement(
181 getElement(node), _globalInferenceResults); 181 getMethod(node), _globalInferenceResults);
182 } 182 }
183 183
184 SideEffects getSideEffects(ir.Node node, ClosedWorld closedWorld) { 184 SideEffects getSideEffects(ir.Node node, ClosedWorld closedWorld) {
185 return closedWorld.getSideEffectsOfElement(getElement(node)); 185 return closedWorld.getSideEffectsOfElement(getElement(node));
186 } 186 }
187 187
188 FunctionSignature getFunctionSignature(ir.FunctionNode function) { 188 FunctionSignature getFunctionSignature(ir.FunctionNode function) {
189 return getElement(function).asFunctionElement().functionSignature; 189 return getElement(function).asFunctionElement().functionSignature;
190 } 190 }
191 191
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 JumpTarget continueTarget = 821 JumpTarget continueTarget =
822 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); 822 astAdapter.getJumpTarget(switchCase, isContinueTarget: true);
823 assert(continueTarget is KernelJumpTarget); 823 assert(continueTarget is KernelJumpTarget);
824 targetIndexMap[continueTarget] = switchIndex; 824 targetIndexMap[continueTarget] = switchIndex;
825 assert(builder.jumpTargets[continueTarget] == null); 825 assert(builder.jumpTargets[continueTarget] == null);
826 builder.jumpTargets[continueTarget] = this; 826 builder.jumpTargets[continueTarget] = this;
827 switchIndex++; 827 switchIndex++;
828 } 828 }
829 } 829 }
830 } 830 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698