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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend.dart

Issue 1109393012: Allow use of deferred type-literals in non-constant contexts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review Created 5 years, 7 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
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 dart_backend; 5 part of dart_backend;
6 6
7 // TODO(ahe): This class is simply wrong. This backend should use 7 // TODO(ahe): This class is simply wrong. This backend should use
8 // elements when it can, not AST nodes. Perhaps a [Map<Element, 8 // elements when it can, not AST nodes. Perhaps a [Map<Element,
9 // TreeElements>] is what is needed. 9 // TreeElements>] is what is needed.
10 class ElementAst { 10 class ElementAst {
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 return constantCompiler.compileConstant(element); 514 return constantCompiler.compileConstant(element);
515 }); 515 });
516 } 516 }
517 517
518 void compileVariable(VariableElement element) { 518 void compileVariable(VariableElement element) {
519 measure(() { 519 measure(() {
520 constantCompiler.compileVariable(element); 520 constantCompiler.compileVariable(element);
521 }); 521 });
522 } 522 }
523 523
524 ConstantExpression compileNode(Node node, TreeElements elements) { 524 ConstantExpression compileNode(Node node, TreeElements elements,
525 {bool enforceConst: true}) {
525 return measure(() { 526 return measure(() {
526 return constantCompiler.compileNodeWithDefinitions(node, elements); 527 return constantCompiler.compileNodeWithDefinitions(node, elements,
528 isConst: enforceConst);
527 }); 529 });
528 } 530 }
529 531
530 ConstantExpression compileMetadata(MetadataAnnotation metadata, 532 ConstantExpression compileMetadata(MetadataAnnotation metadata,
531 Node node, 533 Node node,
532 TreeElements elements) { 534 TreeElements elements) {
533 return measure(() { 535 return measure(() {
534 return constantCompiler.compileMetadata(metadata, node, elements); 536 return constantCompiler.compileMetadata(metadata, node, elements);
535 }); 537 });
536 } 538 }
(...skipping 19 matching lines...) Expand all
556 } 558 }
557 559
558 void traceGraph(String title, var irObject) { 560 void traceGraph(String title, var irObject) {
559 compiler.tracer.traceGraph(title, irObject); 561 compiler.tracer.traceGraph(title, irObject);
560 } 562 }
561 563
562 DartTypes get dartTypes => compiler.types; 564 DartTypes get dartTypes => compiler.types;
563 565
564 InternalErrorFunction get internalError => compiler.internalError; 566 InternalErrorFunction get internalError => compiler.internalError;
565 } 567 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/constants/expressions.dart ('k') | pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698