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

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

Issue 2686533002: Refactor computation of NativeBehavior. (Closed)
Patch Set: Updated cf. comments. 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/js_backend/backend.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | 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) 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // TODO(johnniwinther): Add the type argument to the list literal when we 244 // TODO(johnniwinther): Add the type argument to the list literal when we
245 // no longer use resolution types. 245 // no longer use resolution types.
246 return new InterfaceType( 246 return new InterfaceType(
247 cls, 247 cls,
248 new List/*<DartType>*/ .filled( 248 new List/*<DartType>*/ .filled(
249 node.typeParameters.length, const DynamicType())); 249 node.typeParameters.length, const DynamicType()));
250 } 250 }
251 251
252 @override 252 @override
253 native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) { 253 native.NativeBehavior getNativeBehaviorForMethod(ir.Procedure procedure) {
254 throw new UnimplementedError('KernelWorldBuilder.getDartType'); 254 throw new UnimplementedError(
255 'KernelWorldBuilder.getNativeBehaviorForMethod');
255 } 256 }
256 257
257 @override 258 @override
258 native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) { 259 native.NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) {
259 throw new UnimplementedError('KernelWorldBuilder.getDartType'); 260 throw new UnimplementedError(
261 'KernelWorldBuilder.getNativeBehaviorForFieldStore');
260 } 262 }
261 263
262 @override 264 @override
263 native.NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field) { 265 native.NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field) {
264 throw new UnimplementedError('KernelWorldBuilder.getDartType'); 266 throw new UnimplementedError(
267 'KernelWorldBuilder.getNativeBehaviorForFieldLoad');
265 } 268 }
266 269
267 LibraryEntity getLibrary(ir.Library node) => _getLibrary(node); 270 LibraryEntity getLibrary(ir.Library node) => _getLibrary(node);
268 271
269 @override 272 @override
270 Local getLocalFunction(ir.TreeNode node) => _getLocal(node); 273 Local getLocalFunction(ir.TreeNode node) => _getLocal(node);
271 274
272 @override 275 @override
273 ClassEntity getClass(ir.Class node) => _getClass(node); 276 ClassEntity getClass(ir.Class node) => _getClass(node);
274 277
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 } 612 }
610 return builder._getLibrary(library); 613 return builder._getLibrary(library);
611 } 614 }
612 615
613 KLibrary getLibraryForFunction(KFunction function) => 616 KLibrary getLibraryForFunction(KFunction function) =>
614 _getLibrary(function, builder._methodMap); 617 _getLibrary(function, builder._methodMap);
615 618
616 KLibrary getLibraryForField(KField field) => 619 KLibrary getLibraryForField(KField field) =>
617 _getLibrary(field, builder._fieldMap); 620 _getLibrary(field, builder._fieldMap);
618 } 621 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/native/behavior.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698