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

Side by Side Diff: dart/frog/leg/ssa/builder.dart

Issue 9646030: Find diagnostic locations for use in new compiler API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 8 years, 9 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 | « dart/frog/leg/resolver.dart ('k') | dart/frog/leg/tree/nodes.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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 if (nextConstructor === null) { 847 if (nextConstructor === null) {
848 // No super initializer found. Try to find the default constructor if 848 // No super initializer found. Try to find the default constructor if
849 // the class is not Object. 849 // the class is not Object.
850 ClassElement enclosingClass = constructor.enclosingElement; 850 ClassElement enclosingClass = constructor.enclosingElement;
851 ClassElement superClass = enclosingClass.superclass; 851 ClassElement superClass = enclosingClass.superclass;
852 ClassElement objectElement = compiler.coreLibrary.find(Types.OBJECT); 852 ClassElement objectElement = compiler.coreLibrary.find(Types.OBJECT);
853 if (enclosingClass != objectElement) { 853 if (enclosingClass != objectElement) {
854 assert(superClass !== null); 854 assert(superClass !== null);
855 assert(superClass.isResolved); 855 assert(superClass.isResolved);
856 nextConstructor = superClass.lookupConstructor(superClass.name); 856 nextConstructor = superClass.lookupConstructor(superClass.name);
857 if (nextConstructor === null && 857 if (nextConstructor === null) {
858 superClass.canHaveDefaultConstructor()) {
859 nextConstructor = superClass.getSynthesizedConstructor();
860 } else if (nextConstructor === null) {
861 compiler.internalError("no default constructor available"); 858 compiler.internalError("no default constructor available");
862 } 859 }
863 } 860 }
864 } 861 }
865 } 862 }
866 // Call the JavaScript constructor with the fields as argument. 863 // Call the JavaScript constructor with the fields as argument.
867 // TODO(floitsch,karlklose): move this code to ClassElement and share with 864 // TODO(floitsch,karlklose): move this code to ClassElement and share with
868 // the emitter. 865 // the emitter.
869 List<HInstruction> constructorArguments = <HInstruction>[]; 866 List<HInstruction> constructorArguments = <HInstruction>[];
870 ClassElement element = classElement; 867 ClassElement element = classElement;
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 // Normally, we would call [close] here. However, then we hit 2486 // Normally, we would call [close] here. However, then we hit
2490 // another unimplemented feature: aborting loop body. Simply 2487 // another unimplemented feature: aborting loop body. Simply
2491 // calling [add] does not work as it asserts that the instruction 2488 // calling [add] does not work as it asserts that the instruction
2492 // isn't a control flow instruction. So we inline parts of [add]. 2489 // isn't a control flow instruction. So we inline parts of [add].
2493 current.addAfter(current.last, new HThrow(message)); 2490 current.addAfter(current.last, new HThrow(message));
2494 if (isExpression) { 2491 if (isExpression) {
2495 stack.add(graph.addConstantNull()); 2492 stack.add(graph.addConstantNull());
2496 } 2493 }
2497 } 2494 }
2498 } 2495 }
OLDNEW
« no previous file with comments | « dart/frog/leg/resolver.dart ('k') | dart/frog/leg/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698