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

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

Issue 10561028: Revert "Don't try to resolve in the builder." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 | dart/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 if (compiler.enqueuer.resolution.getCachedElements(element) === null) { 2358 compiler.resolver.resolveMethodElement(element);
2359 compiler.internalError("Unresolved element: $element", node: node);
2360 }
2361 FunctionElement functionElement = element; 2359 FunctionElement functionElement = element;
2362 element = functionElement.defaultImplementation; 2360 element = functionElement.defaultImplementation;
2363 HInstruction target = new HStatic(element); 2361 HInstruction target = new HStatic(element);
2364 add(target); 2362 add(target);
2365 var inputs = <HInstruction>[]; 2363 var inputs = <HInstruction>[];
2366 inputs.add(target); 2364 inputs.add(target);
2367 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, 2365 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments,
2368 element, inputs); 2366 element, inputs);
2369 if (!succeeded) { 2367 if (!succeeded) {
2370 // 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
3462 void visitNodeList(NodeList node) { 3460 void visitNodeList(NodeList node) {
3463 node.visitChildren(this); 3461 node.visitChildren(this);
3464 } 3462 }
3465 3463
3466 HInstruction concat(HInstruction left, HInstruction right) { 3464 HInstruction concat(HInstruction left, HInstruction right) {
3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); 3465 HInstruction instruction = new HStringConcat(left, right, diagnosticNode);
3468 builder.add(instruction); 3466 builder.add(instruction);
3469 return instruction; 3467 return instruction;
3470 } 3468 }
3471 } 3469 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/language/resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698