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

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

Issue 2668723002: Handle JS-calls in impact_test. (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
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/names.dart'; 8 import '../common/names.dart';
9 import '../core_types.dart'; 9 import '../core_types.dart';
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 }); 205 });
206 return list; 206 return list;
207 } 207 }
208 208
209 @override 209 @override
210 InterfaceType getThisType(ClassEntity cls) { 210 InterfaceType getThisType(ClassEntity cls) {
211 throw new UnimplementedError('KernelWorldBuilder.getThisType'); 211 throw new UnimplementedError('KernelWorldBuilder.getThisType');
212 } 212 }
213 213
214 @override 214 @override
215 InterfaceType getRawType(ClassEntity cls) { 215 InterfaceType getRawType(KClass cls) {
216 throw new UnimplementedError('KernelWorldBuilder.getRawType'); 216 KClassEnv env = _classEnvs[cls.classIndex];
217 ir.Class node = env.cls;
218 // TODO(johnniwinther): Add the type argument to the list literal when we
219 // no longer use resolution types.
220 return new InterfaceType(cls, new List/*<DartType>*/.filled(
221 node.typeParameters.length, const DynamicType()));
217 } 222 }
218 223
219 @override 224 @override
220 InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node) {
221 throw new UnimplementedError('KernelWorldBuilder.getDartType');
222 }
223
224 @override
225 native.NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall(
226 ir.StaticInvocation node) {
227 throw new UnimplementedError('KernelWorldBuilder.getDartType');
228 }
229
230 @override
231 native.NativeBehavior getNativeBehaviorForJsBuiltinCall(
232 ir.StaticInvocation node) {
233 throw new UnimplementedError('KernelWorldBuilder.getDartType');
234 }
235
236 @override
237 native.NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node) {
238 throw new UnimplementedError('KernelWorldBuilder.getDartType');
239 }
240
241 @override
242 native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) { 225 native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) {
243 throw new UnimplementedError('KernelWorldBuilder.getDartType'); 226 throw new UnimplementedError('KernelWorldBuilder.getDartType');
244 } 227 }
245 228
246 @override 229 @override
247 native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) { 230 native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) {
248 throw new UnimplementedError('KernelWorldBuilder.getDartType'); 231 throw new UnimplementedError('KernelWorldBuilder.getDartType');
249 } 232 }
250 233
251 @override 234 @override
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 334 }
352 335
353 @override 336 @override
354 InterfaceType createInterfaceType( 337 InterfaceType createInterfaceType(
355 ClassEntity cls, List<DartType> typeArguments) { 338 ClassEntity cls, List<DartType> typeArguments) {
356 return new InterfaceType(cls, typeArguments); 339 return new InterfaceType(cls, typeArguments);
357 } 340 }
358 341
359 @override 342 @override
360 InterfaceType getRawType(ClassEntity cls) { 343 InterfaceType getRawType(ClassEntity cls) {
361 throw new UnimplementedError('KernelCommonElements.getRawType'); 344 return worldBuilder.getRawType(cls);
362 } 345 }
363 346
364 @override 347 @override
365 FunctionEntity findConstructor(ClassEntity cls, String name, 348 FunctionEntity findConstructor(ClassEntity cls, String name,
366 {bool required: true}) { 349 {bool required: true}) {
367 throw new UnimplementedError('KernelCommonElements.findConstructor'); 350 throw new UnimplementedError('KernelCommonElements.findConstructor');
368 } 351 }
369 352
370 @override 353 @override
371 MemberEntity findClassMember(ClassEntity cls, String name, 354 MemberEntity findClassMember(ClassEntity cls, String name,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 } 494 }
512 return builder._getLibrary(library); 495 return builder._getLibrary(library);
513 } 496 }
514 497
515 KLibrary getLibraryForFunction(KFunction function) => 498 KLibrary getLibraryForFunction(KFunction function) =>
516 _getLibrary(function, builder._methodMap); 499 _getLibrary(function, builder._methodMap);
517 500
518 KLibrary getLibraryForField(KField field) => 501 KLibrary getLibraryForField(KField field) =>
519 _getLibrary(field, builder._fieldMap); 502 _getLibrary(field, builder._fieldMap);
520 } 503 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698