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

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

Issue 10559031: Don't try to resolve in the builder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « no previous file | tests/language/resolution_test.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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 } else if (element.isGenerativeConstructor()) { 2348 } else if (element.isGenerativeConstructor()) {
2349 ClassElement cls = element.enclosingElement; 2349 ClassElement cls = element.enclosingElement;
2350 return new HBoundedType.exact(cls.type); 2350 return new HBoundedType.exact(cls.type);
2351 } else { 2351 } else {
2352 return HType.UNKNOWN; 2352 return HType.UNKNOWN;
2353 } 2353 }
2354 } 2354 }
2355 2355
2356 Selector selector = elements.getSelector(node); 2356 Selector selector = elements.getSelector(node);
2357 Element element = elements[node]; 2357 Element element = elements[node];
2358 compiler.resolver.resolveMethodElement(element); 2358 assert(compiler.enqueuer.resolution.getCachedElements(element) !== null);
ahe 2012/06/18 09:50:07 I would prefer if this was an internal error: if
floitsch 2012/06/18 10:30:22 Done.
2359 FunctionElement functionElement = element; 2359 FunctionElement functionElement = element;
2360 element = functionElement.defaultImplementation; 2360 element = functionElement.defaultImplementation;
2361 HInstruction target = new HStatic(element); 2361 HInstruction target = new HStatic(element);
2362 add(target); 2362 add(target);
2363 var inputs = <HInstruction>[]; 2363 var inputs = <HInstruction>[];
2364 inputs.add(target); 2364 inputs.add(target);
2365 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, 2365 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments,
2366 element, inputs); 2366 element, inputs);
2367 if (!succeeded) { 2367 if (!succeeded) {
2368 // TODO(ngeoffray): Match the VM behavior and throw an 2368 // TODO(ngeoffray): Match the VM behavior and throw an
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
3460 void visitNodeList(NodeList node) { 3460 void visitNodeList(NodeList node) {
3461 node.visitChildren(this); 3461 node.visitChildren(this);
3462 } 3462 }
3463 3463
3464 HInstruction concat(HInstruction left, HInstruction right) { 3464 HInstruction concat(HInstruction left, HInstruction right) {
3465 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); 3465 HInstruction instruction = new HStringConcat(left, right, diagnosticNode);
3466 builder.add(instruction); 3466 builder.add(instruction);
3467 return instruction; 3467 return instruction;
3468 } 3468 }
3469 } 3469 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698