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

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

Issue 10161022: Fix performance regression on some benchmarks: add an extendable array type where push and pop can … (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 | « no previous file | lib/compiler/implementation/ssa/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 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 if (!succeeded) { 2157 if (!succeeded) {
2158 // TODO(ngeoffray): Match the VM behavior and throw an 2158 // TODO(ngeoffray): Match the VM behavior and throw an
2159 // exception at runtime. 2159 // exception at runtime.
2160 compiler.cancel('Unimplemented non-matching static call', node: node); 2160 compiler.cancel('Unimplemented non-matching static call', node: node);
2161 } 2161 }
2162 HType type = HType.UNKNOWN; 2162 HType type = HType.UNKNOWN;
2163 Element originalElement = elements[node]; 2163 Element originalElement = elements[node];
2164 if (originalElement.isGenerativeConstructor() 2164 if (originalElement.isGenerativeConstructor()
2165 && originalElement.enclosingElement === compiler.listClass) { 2165 && originalElement.enclosingElement === compiler.listClass) {
2166 if (node.arguments.isEmpty()) { 2166 if (node.arguments.isEmpty()) {
2167 type = HType.EXTENDABLE_ARRAY;
2168 } else {
2167 type = HType.MUTABLE_ARRAY; 2169 type = HType.MUTABLE_ARRAY;
2168 } else {
2169 type = HType.READABLE_ARRAY;
2170 } 2170 }
2171 } else if (element.isGenerativeConstructor()) { 2171 } else if (element.isGenerativeConstructor()) {
2172 ClassElement cls = element.enclosingElement; 2172 ClassElement cls = element.enclosingElement;
2173 type = new HNonPrimitiveType(cls.type); 2173 type = new HNonPrimitiveType(cls.type);
2174 } 2174 }
2175 push(new HInvokeStatic(selector, inputs, type)); 2175 push(new HInvokeStatic(selector, inputs, type));
2176 } else { 2176 } else {
2177 if (element.kind == ElementKind.GETTER) { 2177 if (element.kind == ElementKind.GETTER) {
2178 target = new HInvokeStatic(Selector.GETTER, inputs); 2178 target = new HInvokeStatic(Selector.GETTER, inputs);
2179 add(target); 2179 add(target);
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
3120 false, 3120 false,
3121 <HInstruction>[target, input])); 3121 <HInstruction>[target, input]));
3122 return builder.pop(); 3122 return builder.pop();
3123 } 3123 }
3124 3124
3125 HInstruction result() { 3125 HInstruction result() {
3126 flushLiterals(); 3126 flushLiterals();
3127 return prefix; 3127 return prefix;
3128 } 3128 }
3129 } 3129 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698