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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.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) 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; 5 library dart2js.ir_builder;
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 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 value = buildThis(); 2404 value = buildThis();
2405 } else if (field.local is closure.TypeVariableLocal) { 2405 } else if (field.local is closure.TypeVariableLocal) {
2406 closure.TypeVariableLocal variable = field.local; 2406 closure.TypeVariableLocal variable = field.local;
2407 value = buildTypeVariableAccess(variable.typeVariable); 2407 value = buildTypeVariableAccess(variable.typeVariable);
2408 } else { 2408 } else {
2409 value = environment.lookup(field.local); 2409 value = environment.lookup(field.local);
2410 } 2410 }
2411 arguments.add(value); 2411 arguments.add(value);
2412 } 2412 }
2413 return addPrimitive(new ir.CreateInstance( 2413 return addPrimitive(new ir.CreateInstance(
2414 classElement, arguments, const <ir.Primitive>[], sourceInformation)); 2414 classElement.rawType, arguments, const <ir.Primitive>[],
2415 sourceInformation));
2415 } 2416 }
2416 2417
2417 /// Create a read access of [local] function, variable, or parameter. 2418 /// Create a read access of [local] function, variable, or parameter.
2418 ir.Primitive buildLocalGet(LocalElement local) { 2419 ir.Primitive buildLocalGet(LocalElement local) {
2419 assert(isOpen); 2420 assert(isOpen);
2420 ClosureLocation location = state.boxedVariables[local]; 2421 ClosureLocation location = state.boxedVariables[local];
2421 if (location != null) { 2422 if (location != null) {
2422 ir.Primitive result = new ir.GetField(environment.lookup(location.box), 2423 ir.Primitive result = new ir.GetField(environment.lookup(location.box),
2423 location.field); 2424 location.field);
2424 result.useElementAsHint(local); 2425 result.useElementAsHint(local);
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
2834 } 2835 }
2835 2836
2836 class SwitchCaseInfo { 2837 class SwitchCaseInfo {
2837 final List<ir.Primitive> constants = <ir.Primitive>[]; 2838 final List<ir.Primitive> constants = <ir.Primitive>[];
2838 final SubbuildFunction buildBody; 2839 final SubbuildFunction buildBody;
2839 2840
2840 SwitchCaseInfo(this.buildBody); 2841 SwitchCaseInfo(this.buildBody);
2841 2842
2842 void addConstant(ir.Primitive constant) => constants.add(constant); 2843 void addConstant(ir.Primitive constant) => constants.add(constant);
2843 } 2844 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698