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

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

Issue 2937203002: Add J-elements (Closed)
Patch Set: Updated cf. comments 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 ConstantValue getFieldConstantValue(ir.Field field) { 104 ConstantValue getFieldConstantValue(ir.Field field) {
105 FieldElement element = getField(field); 105 FieldElement element = getField(field);
106 if (element.constant != null) { 106 if (element.constant != null) {
107 return computeConstantValue(element.constant); 107 return computeConstantValue(element.constant);
108 } 108 }
109 return null; 109 return null;
110 } 110 }
111 111
112 /// Called to find the corresponding Kernel element for a particular Element 112 /// Called to find the corresponding Kernel element for a particular Element
113 /// before traversing over it with a Kernel visitor. 113 /// before traversing over it with a Kernel visitor.
114 ir.Node getInitialKernelNode(MemberElement originTarget) { 114 ir.Node getMemberNode(MemberElement originTarget) {
115 ir.Node target; 115 ir.Node target;
116 if (originTarget.isPatch) { 116 if (originTarget.isPatch) {
117 originTarget = originTarget.origin; 117 originTarget = originTarget.origin;
118 } 118 }
119 if (originTarget is MethodElement) { 119 if (originTarget is MethodElement) {
120 if (originTarget is ConstructorBodyElement) { 120 if (originTarget is ConstructorBodyElement) {
121 ConstructorBodyElement body = originTarget; 121 ConstructorBodyElement body = originTarget;
122 originTarget = body.constructor; 122 originTarget = body.constructor;
123 } 123 }
124 target = kernel.functions[originTarget]; 124 target = kernel.functions[originTarget];
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { 643 TypeMask selectorTypeOf(Selector selector, TypeMask mask) {
644 return TypeMaskFactory.inferredTypeForSelector( 644 return TypeMaskFactory.inferredTypeForSelector(
645 selector, mask, _globalInferenceResults); 645 selector, mask, _globalInferenceResults);
646 } 646 }
647 647
648 TypeMask typeFromNativeBehavior( 648 TypeMask typeFromNativeBehavior(
649 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { 649 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) {
650 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); 650 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld);
651 } 651 }
652 } 652 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/kernel_string_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698