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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1584543002: dart2js cps: Support inlining constructors with type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status files and unit tests Created 4 years, 11 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.ir_builder_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closure; 7 import '../closure.dart' as closure;
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/names.dart' show 9 import '../common/names.dart' show
10 Names, 10 Names,
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 ir.Primitive value = fieldValues[field]; 445 ir.Primitive value = fieldValues[field];
446 if (value != null) { 446 if (value != null) {
447 instanceArguments.add(value); 447 instanceArguments.add(value);
448 } else { 448 } else {
449 assert(backend.isNativeOrExtendsNative(c)); 449 assert(backend.isNativeOrExtendsNative(c));
450 // Native fields are initialized elsewhere. 450 // Native fields are initialized elsewhere.
451 } 451 }
452 }, includeSuperAndInjectedMembers: true); 452 }, includeSuperAndInjectedMembers: true);
453 453
454 ir.Primitive instance = new ir.CreateInstance( 454 ir.Primitive instance = new ir.CreateInstance(
455 classElement, 455 classElement.thisType,
456 instanceArguments, 456 instanceArguments,
457 typeInformation, 457 typeInformation,
458 constructor.hasNode 458 constructor.hasNode
459 ? sourceInformationBuilder.buildCreate(constructor.node) 459 ? sourceInformationBuilder.buildCreate(constructor.node)
460 // TODO(johnniwinther): Provide source information for creation 460 // TODO(johnniwinther): Provide source information for creation
461 // through synthetic constructors. 461 // through synthetic constructors.
462 : null); 462 : null);
463 irBuilder.add(new ir.LetPrim(instance)); 463 irBuilder.add(new ir.LetPrim(instance));
464 464
465 // --- Call constructor bodies --- 465 // --- Call constructor bodies ---
(...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after
3549 } 3549 }
3550 3550
3551 Element get closureConverter { 3551 Element get closureConverter {
3552 return _backend.helpers.closureConverter; 3552 return _backend.helpers.closureConverter;
3553 } 3553 }
3554 3554
3555 void addNativeMethod(FunctionElement function) { 3555 void addNativeMethod(FunctionElement function) {
3556 _backend.emitter.nativeEmitter.nativeMethods.add(function); 3556 _backend.emitter.nativeEmitter.nativeMethods.add(function);
3557 } 3557 }
3558 } 3558 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698