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

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 10827353: Fix a performance regressions introduced by r10632. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up FunctionElement.isInstanceMember and remove redundent code. Created 8 years, 4 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/js_backend/backend.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 #library('elements'); 5 #library('elements');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 void setPatch(FunctionElement patchElement) { 829 void setPatch(FunctionElement patchElement) {
830 // Sanity checks. The caller must check these things before calling. 830 // Sanity checks. The caller must check these things before calling.
831 assert(patch === null); 831 assert(patch === null);
832 assert(cachedNode === null); 832 assert(cachedNode === null);
833 this.patch = patchElement; 833 this.patch = patchElement;
834 cachedNode = patchElement.cachedNode; 834 cachedNode = patchElement.cachedNode;
835 } 835 }
836 836
837 bool isInstanceMember() { 837 bool isInstanceMember() {
838 return isMember() 838 return isMember()
839 && kind != ElementKind.GENERATIVE_CONSTRUCTOR 839 && !isConstructor()
840 && !modifiers.isFactory()
841 && !modifiers.isStatic(); 840 && !modifiers.isStatic();
842 } 841 }
843 842
844 FunctionSignature computeSignature(Compiler compiler) { 843 FunctionSignature computeSignature(Compiler compiler) {
845 if (functionSignature !== null) return functionSignature; 844 if (functionSignature !== null) return functionSignature;
846 compiler.withCurrentElement(this, () { 845 compiler.withCurrentElement(this, () {
847 functionSignature = compiler.resolveSignature(this); 846 functionSignature = compiler.resolveSignature(this);
848 }); 847 });
849 return functionSignature; 848 return functionSignature;
850 } 849 }
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 Node parseNode(compiler) => cachedNode; 1478 Node parseNode(compiler) => cachedNode;
1480 1479
1481 String toString() => "${enclosingElement.toString()}.${name.slowToString()}"; 1480 String toString() => "${enclosingElement.toString()}.${name.slowToString()}";
1482 1481
1483 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) { 1482 TypeVariableElement cloneTo(Element enclosing, DiagnosticListener listener) {
1484 TypeVariableElement result = 1483 TypeVariableElement result =
1485 new TypeVariableElement(name, enclosing, node, type, bound); 1484 new TypeVariableElement(name, enclosing, node, type, bound);
1486 return result; 1485 return result;
1487 } 1486 }
1488 } 1487 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698