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

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

Issue 10113007: We must use the original element and not the default implementation element when checking if the co… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « frog/tests/leg/src/mock_compiler.dart ('k') | no next file » | 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 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 element, inputs); 2148 element, inputs);
2149 if (!succeeded) { 2149 if (!succeeded) {
2150 // TODO(ngeoffray): Match the VM behavior and throw an 2150 // TODO(ngeoffray): Match the VM behavior and throw an
2151 // exception at runtime. 2151 // exception at runtime.
2152 compiler.cancel('Unimplemented non-matching static call', node: node); 2152 compiler.cancel('Unimplemented non-matching static call', node: node);
2153 } 2153 }
2154 HType type = HType.UNKNOWN; 2154 HType type = HType.UNKNOWN;
2155 if (element.isGenerativeConstructor()) { 2155 if (element.isGenerativeConstructor()) {
2156 ClassElement cls = element.enclosingElement; 2156 ClassElement cls = element.enclosingElement;
2157 type = new HNonPrimitiveType(cls.type); 2157 type = new HNonPrimitiveType(cls.type);
2158 } else if (element.isFactoryConstructor() 2158 } else if (element.isFactoryConstructor()
floitsch 2012/04/19 10:50:32 Since we need to look at the original non-forwarde
ngeoffray 2012/04/19 16:17:52 Done.
2159 && element === compiler.listClass) { 2159 && elements[node].enclosingElement === compiler.listClass) {
2160 type = HType.MUTABLE_ARRAY; 2160 type = HType.MUTABLE_ARRAY;
2161 } 2161 }
2162 push(new HInvokeStatic(selector, inputs, type)); 2162 push(new HInvokeStatic(selector, inputs, type));
2163 } else { 2163 } else {
2164 if (element.kind == ElementKind.GETTER) { 2164 if (element.kind == ElementKind.GETTER) {
2165 target = new HInvokeStatic(Selector.GETTER, inputs); 2165 target = new HInvokeStatic(Selector.GETTER, inputs);
2166 add(target); 2166 add(target);
2167 inputs = <HInstruction>[target]; 2167 inputs = <HInstruction>[target];
2168 } 2168 }
2169 addDynamicSendArgumentsToList(node, inputs); 2169 addDynamicSendArgumentsToList(node, inputs);
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 false, 3107 false,
3108 <HInstruction>[target, input])); 3108 <HInstruction>[target, input]));
3109 return builder.pop(); 3109 return builder.pop();
3110 } 3110 }
3111 3111
3112 HInstruction result() { 3112 HInstruction result() {
3113 flushLiterals(); 3113 flushLiterals();
3114 return prefix; 3114 return prefix;
3115 } 3115 }
3116 } 3116 }
OLDNEW
« no previous file with comments | « frog/tests/leg/src/mock_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698