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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart

Issue 26472002: Add TypeVariable object on runtime to support reflection on type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/backend.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * The [ConstantHandler] keeps track of compile-time constants, 8 * The [ConstantHandler] keeps track of compile-time constants,
9 * initializations of global and static fields, and default values of 9 * initializations of global and static fields, and default values of
10 * optional parameters. 10 * optional parameters.
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 InterfaceType type = elements.getType(node); 628 InterfaceType type = elements.getType(node);
629 List<Constant> evaluateArguments(FunctionElement constructor) { 629 List<Constant> evaluateArguments(FunctionElement constructor) {
630 Selector selector = elements.getSelector(send); 630 Selector selector = elements.getSelector(send);
631 return evaluateArgumentsToConstructor( 631 return evaluateArgumentsToConstructor(
632 node, selector, send.arguments, constructor); 632 node, selector, send.arguments, constructor);
633 } 633 }
634 return makeConstructedConstant(node, type, constructor, evaluateArguments); 634 return makeConstructedConstant(node, type, constructor, evaluateArguments);
635 } 635 }
636 636
637 Constant makeConstructedConstant( 637 Constant makeConstructedConstant(
638 Node node, InterfaceType type, FunctionElement constructor, 638 Spannable node, InterfaceType type, FunctionElement constructor,
639 List<Constant> getArguments(FunctionElement constructor)) { 639 List<Constant> getArguments(FunctionElement constructor)) {
640 if (constructor.isRedirectingFactory) { 640 if (constructor.isRedirectingFactory) {
641 type = constructor.computeTargetType(compiler, type); 641 type = constructor.computeTargetType(compiler, type);
642 } 642 }
643 643
644 // The redirection chain of this element may not have been resolved through 644 // The redirection chain of this element may not have been resolved through
645 // a post-process action, so we have to make sure it is done here. 645 // a post-process action, so we have to make sure it is done here.
646 compiler.resolver.resolveRedirectionChain(constructor, node); 646 compiler.resolver.resolveRedirectionChain(constructor, node);
647 constructor = constructor.redirectionTarget; 647 constructor = constructor.redirectionTarget;
648 ClassElement classElement = constructor.getEnclosingClass(); 648 ClassElement classElement = constructor.getEnclosingClass();
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 if (fieldValue == null) { 878 if (fieldValue == null) {
879 // Use the default value. 879 // Use the default value.
880 fieldValue = handler.compileConstant(field); 880 fieldValue = handler.compileConstant(field);
881 } 881 }
882 jsNewArguments.add(fieldValue); 882 jsNewArguments.add(fieldValue);
883 }, 883 },
884 includeSuperAndInjectedMembers: true); 884 includeSuperAndInjectedMembers: true);
885 return jsNewArguments; 885 return jsNewArguments;
886 } 886 }
887 } 887 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698