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

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

Issue 9355031: Improve List implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and resolved conflicts Created 8 years, 10 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/ssa/codegen.dart ('k') | dart/frog/tests/leg/src/mock_compiler.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 interface HVisitor<R> { 5 interface HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBailoutTarget(HBailoutTarget node); 7 R visitBailoutTarget(HBailoutTarget node);
8 R visitBitAnd(HBitAnd node); 8 R visitBitAnd(HBitAnd node);
9 R visitBitNot(HBitNot node); 9 R visitBitNot(HBitNot node);
10 R visitBitOr(HBitOr node); 10 R visitBitOr(HBitOr node);
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 1084
1085 HInvokeInterceptor(Selector selector, 1085 HInvokeInterceptor(Selector selector,
1086 SourceString this.name, 1086 SourceString this.name,
1087 bool this.getter, 1087 bool this.getter,
1088 List<HInstruction> inputs) 1088 List<HInstruction> inputs)
1089 : super(selector, inputs); 1089 : super(selector, inputs);
1090 toString() => 'invoke interceptor: ${element.name}'; 1090 toString() => 'invoke interceptor: ${element.name}';
1091 accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this); 1091 accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this);
1092 1092
1093 HType computeType() { 1093 HType computeType() {
1094 if (name == const SourceString('length') && inputs[1].isStringOrArray()) { 1094 if (getter && name == const SourceString('length')
1095 && inputs[1].isStringOrArray()) {
1095 builtinJsName = 'length'; 1096 builtinJsName = 'length';
1096 return HType.INTEGER; 1097 return HType.INTEGER;
1097 } else if (name == const SourceString('add') && inputs[1].isArray()) { 1098 } else if (name == const SourceString('add') && inputs[1].isArray()) {
1098 builtinJsName = 'push'; 1099 builtinJsName = 'push';
1099 } else if (name == const SourceString('removeLast') 1100 } else if (name == const SourceString('removeLast')
1100 && inputs[1].isArray()) { 1101 && inputs[1].isArray()) {
1101 builtinJsName = 'pop'; 1102 builtinJsName = 'pop';
1102 } 1103 }
1103 return HType.UNKNOWN; 1104 return HType.UNKNOWN;
1104 } 1105 }
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 2132
2132 HInstruction get expression() => inputs[0]; 2133 HInstruction get expression() => inputs[0];
2133 2134
2134 HType computeType() => HType.BOOLEAN; 2135 HType computeType() => HType.BOOLEAN;
2135 bool hasExpectedType() => true; 2136 bool hasExpectedType() => true;
2136 2137
2137 accept(HVisitor visitor) => visitor.visitIs(this); 2138 accept(HVisitor visitor) => visitor.visitIs(this);
2138 2139
2139 toString() => "$expression is $typeExpression"; 2140 toString() => "$expression is $typeExpression";
2140 } 2141 }
OLDNEW
« no previous file with comments | « dart/frog/leg/ssa/codegen.dart ('k') | dart/frog/tests/leg/src/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698