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

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

Issue 2919713003: Remove KernelAstAdapter.getNativeBehavior (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
« 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 '../closure.dart'; 8 import '../closure.dart';
9 import '../common.dart'; 9 import '../common.dart';
10 import '../compiler.dart'; 10 import '../compiler.dart';
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 {bool isContinueTarget: false}) { 273 {bool isContinueTarget: false}) {
274 return _jumpTargets.putIfAbsent(node, () { 274 return _jumpTargets.putIfAbsent(node, () {
275 if (node is ir.LabeledStatement && _jumpTargets.containsKey(node.body)) { 275 if (node is ir.LabeledStatement && _jumpTargets.containsKey(node.body)) {
276 return _jumpTargets[node.body]; 276 return _jumpTargets[node.body];
277 } 277 }
278 return new KernelJumpTarget(node, this, 278 return new KernelJumpTarget(node, this,
279 makeContinueLabel: isContinueTarget); 279 makeContinueLabel: isContinueTarget);
280 }); 280 });
281 } 281 }
282 282
283 native.NativeBehavior getNativeBehavior(ir.Node node) {
284 return elements.getNativeData(getNode(node));
285 }
286
287 js.Name getNameForJsGetName(ir.Node argument, ConstantValue constant) { 283 js.Name getNameForJsGetName(ir.Node argument, ConstantValue constant) {
288 int index = _extractEnumIndexFromConstantValue( 284 int index = _extractEnumIndexFromConstantValue(
289 constant, _compiler.commonElements.jsGetNameEnum); 285 constant, _compiler.commonElements.jsGetNameEnum);
290 if (index == null) return null; 286 if (index == null) return null;
291 return _backend.namer 287 return _backend.namer
292 .getNameForJsGetName(getNode(argument), JsGetName.values[index]); 288 .getNameForJsGetName(getNode(argument), JsGetName.values[index]);
293 } 289 }
294 290
295 js.Template getJsBuiltinTemplate(ConstantValue constant) { 291 js.Template getJsBuiltinTemplate(ConstantValue constant) {
296 int index = _extractEnumIndexFromConstantValue( 292 int index = _extractEnumIndexFromConstantValue(
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { 685 TypeMask selectorTypeOf(Selector selector, TypeMask mask) {
690 return TypeMaskFactory.inferredTypeForSelector( 686 return TypeMaskFactory.inferredTypeForSelector(
691 selector, mask, _globalInferenceResults); 687 selector, mask, _globalInferenceResults);
692 } 688 }
693 689
694 TypeMask typeFromNativeBehavior( 690 TypeMask typeFromNativeBehavior(
695 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { 691 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) {
696 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); 692 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld);
697 } 693 }
698 } 694 }
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