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

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

Issue 1417103002: Add ElementKind for factory constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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/compiler.dart ('k') | pkg/compiler/lib/src/elements/common.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_task; 5 library dart2js.ir_builder_task;
6 6
7 import '../closure.dart' as closurelib; 7 import '../closure.dart' as closurelib;
8 import '../closure.dart' hide ClosureScope; 8 import '../closure.dart' hide ClosureScope;
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show 10 import '../common/names.dart' show
(...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 ir.FunctionDefinition root; 2622 ir.FunctionDefinition root;
2623 switch (element.kind) { 2623 switch (element.kind) {
2624 case ElementKind.GENERATIVE_CONSTRUCTOR: 2624 case ElementKind.GENERATIVE_CONSTRUCTOR:
2625 root = buildConstructor(element); 2625 root = buildConstructor(element);
2626 break; 2626 break;
2627 2627
2628 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY: 2628 case ElementKind.GENERATIVE_CONSTRUCTOR_BODY:
2629 root = buildConstructorBody(element); 2629 root = buildConstructorBody(element);
2630 break; 2630 break;
2631 2631
2632 case ElementKind.FACTORY_CONSTRUCTOR:
2632 case ElementKind.FUNCTION: 2633 case ElementKind.FUNCTION:
2633 case ElementKind.GETTER: 2634 case ElementKind.GETTER:
2634 case ElementKind.SETTER: 2635 case ElementKind.SETTER:
2635 root = buildFunction(element); 2636 root = buildFunction(element);
2636 break; 2637 break;
2637 2638
2638 case ElementKind.FIELD: 2639 case ElementKind.FIELD:
2639 if (Elements.isStaticOrTopLevel(element)) { 2640 if (Elements.isStaticOrTopLevel(element)) {
2640 root = buildStaticFieldInitializer(element); 2641 root = buildStaticFieldInitializer(element);
2641 } else { 2642 } else {
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
3576 if (compiler.backend.isForeign(function)) { 3577 if (compiler.backend.isForeign(function)) {
3577 return handleForeignCode(node, function, argumentList, callStructure); 3578 return handleForeignCode(node, function, argumentList, callStructure);
3578 } else { 3579 } else {
3579 return irBuilder.buildStaticFunctionInvocation(function, callStructure, 3580 return irBuilder.buildStaticFunctionInvocation(function, callStructure,
3580 translateStaticArguments(argumentList, function, callStructure), 3581 translateStaticArguments(argumentList, function, callStructure),
3581 sourceInformation: 3582 sourceInformation:
3582 sourceInformationBuilder.buildCall(node, node.selector)); 3583 sourceInformationBuilder.buildCall(node, node.selector));
3583 } 3584 }
3584 } 3585 }
3585 } 3586 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698