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

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

Issue 16001006: Enqueue fields for resolution in the enqueuer, instead of doing it in the resolver. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 26 matching lines...) Expand all
37 HGraph graph; 37 HGraph graph;
38 ElementKind kind = element.kind; 38 ElementKind kind = element.kind;
39 if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) { 39 if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
40 graph = compileConstructor(builder, work); 40 graph = compileConstructor(builder, work);
41 } else if (kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY || 41 } else if (kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY ||
42 kind == ElementKind.FUNCTION || 42 kind == ElementKind.FUNCTION ||
43 kind == ElementKind.GETTER || 43 kind == ElementKind.GETTER ||
44 kind == ElementKind.SETTER) { 44 kind == ElementKind.SETTER) {
45 graph = builder.buildMethod(element); 45 graph = builder.buildMethod(element);
46 } else if (kind == ElementKind.FIELD) { 46 } else if (kind == ElementKind.FIELD) {
47 assert(!element.isInstanceMember());
47 graph = builder.buildLazyInitializer(element); 48 graph = builder.buildLazyInitializer(element);
48 } else { 49 } else {
49 compiler.internalErrorOnElement(element, 50 compiler.internalErrorOnElement(element,
50 'unexpected element kind $kind'); 51 'unexpected element kind $kind');
51 } 52 }
52 assert(graph.isValid()); 53 assert(graph.isValid());
53 if (!identical(kind, ElementKind.FIELD)) { 54 if (!identical(kind, ElementKind.FIELD)) {
54 FunctionElement function = element; 55 FunctionElement function = element;
55 graph.calledInLoop = compiler.world.isCalledInLoop(function); 56 graph.calledInLoop = compiler.world.isCalledInLoop(function);
56 OptionalParameterTypes defaultValueTypes = null; 57 OptionalParameterTypes defaultValueTypes = null;
(...skipping 5307 matching lines...) Expand 10 before | Expand all | Expand 10 after
5364 new HSubGraphBlockInformation(elseBranch.graph)); 5365 new HSubGraphBlockInformation(elseBranch.graph));
5365 5366
5366 HBasicBlock conditionStartBlock = conditionBranch.block; 5367 HBasicBlock conditionStartBlock = conditionBranch.block;
5367 conditionStartBlock.setBlockFlow(info, joinBlock); 5368 conditionStartBlock.setBlockFlow(info, joinBlock);
5368 SubGraph conditionGraph = conditionBranch.graph; 5369 SubGraph conditionGraph = conditionBranch.graph;
5369 HIf branch = conditionGraph.end.last; 5370 HIf branch = conditionGraph.end.last;
5370 assert(branch is HIf); 5371 assert(branch is HIf);
5371 branch.blockInformation = conditionStartBlock.blockFlow; 5372 branch.blockInformation = conditionStartBlock.blockFlow;
5372 } 5373 }
5373 } 5374 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | tests/lib/mirrors/mirrors_resolve_fields_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698