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

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

Issue 2968383002: Add ConstructorBodyEntity (Closed)
Patch Set: Skip non-live constructor bodies Created 3 years, 5 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 library dart2js.kernel.env; 5 library dart2js.kernel.env;
6 6
7 import 'package:kernel/ast.dart' as ir; 7 import 'package:kernel/ast.dart' as ir;
8 import 'package:kernel/clone.dart'; 8 import 'package:kernel/clone.dart';
9 import 'package:kernel/type_algebra.dart'; 9 import 'package:kernel/type_algebra.dart';
10 10
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 @override 378 @override
379 FunctionData copy() { 379 FunctionData copy() {
380 return new FunctionData(node, functionNode); 380 return new FunctionData(node, functionNode);
381 } 381 }
382 } 382 }
383 383
384 class ConstructorData extends FunctionData { 384 class ConstructorData extends FunctionData {
385 ConstantConstructor _constantConstructor; 385 ConstantConstructor _constantConstructor;
386 ConstructorBodyEntity constructorBody;
386 387
387 ConstructorData(ir.Member node, ir.FunctionNode functionNode) 388 ConstructorData(ir.Member node, ir.FunctionNode functionNode)
388 : super(node, functionNode); 389 : super(node, functionNode);
389 390
390 ConstantConstructor getConstructorConstant( 391 ConstantConstructor getConstructorConstant(
391 KernelToElementMapBase elementMap, ConstructorEntity constructor) { 392 KernelToElementMapBase elementMap, ConstructorEntity constructor) {
392 if (_constantConstructor == null) { 393 if (_constantConstructor == null) {
393 if (node is ir.Constructor && constructor.isConst) { 394 if (node is ir.Constructor && constructor.isConst) {
394 _constantConstructor = 395 _constantConstructor =
395 new Constantifier(elementMap).computeConstantConstructor(node); 396 new Constantifier(elementMap).computeConstantConstructor(node);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 430 }
430 } 431 }
431 return _constant; 432 return _constant;
432 } 433 }
433 434
434 @override 435 @override
435 FieldData copy() { 436 FieldData copy() {
436 return new FieldData(node); 437 return new FieldData(node);
437 } 438 }
438 } 439 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/kelements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698