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

Side by Side Diff: pkg/compiler/lib/src/kernel/world_builder.dart

Issue 2685673004: Handle Creates and Returns annotations in KernelBehaviorBuilder (Closed)
Patch Set: Updated cf. comment 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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart'; 8 import '../common/backend_api.dart';
9 import '../common/names.dart'; 9 import '../common/names.dart';
10 import '../compile_time_constants.dart'; 10 import '../compile_time_constants.dart';
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 MemberEntity lookupLibraryMember(KLibrary library, String name, 100 MemberEntity lookupLibraryMember(KLibrary library, String name,
101 {bool setter: false}) { 101 {bool setter: false}) {
102 KLibraryEnv libraryEnv = _libraryEnvs[library.libraryIndex]; 102 KLibraryEnv libraryEnv = _libraryEnvs[library.libraryIndex];
103 ir.Member member = libraryEnv.lookupMember(name, setter: setter); 103 ir.Member member = libraryEnv.lookupMember(name, setter: setter);
104 return member != null ? getMember(member) : null; 104 return member != null ? getMember(member) : null;
105 } 105 }
106 106
107 ClassEntity lookupClass(KLibrary library, String name) { 107 ClassEntity lookupClass(KLibrary library, String name) {
108 KLibraryEnv libraryEnv = _libraryEnvs[library.libraryIndex]; 108 KLibraryEnv libraryEnv = _libraryEnvs[library.libraryIndex];
109 KClassEnv classEnv = libraryEnv.lookupClass(name); 109 KClassEnv classEnv = libraryEnv.lookupClass(name);
110 return _getClass(classEnv.cls, classEnv); 110 if (classEnv != null) {
111 return _getClass(classEnv.cls, classEnv);
112 }
113 return null;
111 } 114 }
112 115
113 MemberEntity lookupClassMember(KClass cls, String name, 116 MemberEntity lookupClassMember(KClass cls, String name,
114 {bool setter: false}) { 117 {bool setter: false}) {
115 KClassEnv classEnv = _classEnvs[cls.classIndex]; 118 KClassEnv classEnv = _classEnvs[cls.classIndex];
116 ir.Member member = classEnv.lookupMember(name, setter: setter); 119 ir.Member member = classEnv.lookupMember(name, setter: setter);
117 return member != null ? getMember(member) : null; 120 return member != null ? getMember(member) : null;
118 } 121 }
119 122
120 ConstructorEntity lookupConstructor(KClass cls, String name) { 123 ConstructorEntity lookupConstructor(KClass cls, String name) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 } 775 }
773 return builder._getLibrary(library); 776 return builder._getLibrary(library);
774 } 777 }
775 778
776 KLibrary getLibraryForFunction(KFunction function) => 779 KLibrary getLibraryForFunction(KFunction function) =>
777 _getLibrary(function, builder._methodMap); 780 _getLibrary(function, builder._methodMap);
778 781
779 KLibrary getLibraryForField(KField field) => 782 KLibrary getLibraryForField(KField field) =>
780 _getLibrary(field, builder._fieldMap); 783 _getLibrary(field, builder._fieldMap);
781 } 784 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_adapter.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698