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

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

Issue 9909011: Implement redirecting natives. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
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
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 visitBitAnd(HBitAnd node); 7 R visitBitAnd(HBitAnd node);
8 R visitBitNot(HBitNot node); 8 R visitBitNot(HBitNot node);
9 R visitBitOr(HBitOr node); 9 R visitBitOr(HBitOr node);
10 R visitBitXor(HBitXor node); 10 R visitBitXor(HBitXor node);
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 final bool getter; 1170 final bool getter;
1171 1171
1172 HInvokeInterceptor(Selector selector, 1172 HInvokeInterceptor(Selector selector,
1173 SourceString this.name, 1173 SourceString this.name,
1174 bool this.getter, 1174 bool this.getter,
1175 List<HInstruction> inputs) 1175 List<HInstruction> inputs)
1176 : super(selector, inputs); 1176 : super(selector, inputs);
1177 toString() => 'invoke interceptor: ${element.name}'; 1177 toString() => 'invoke interceptor: ${element.name}';
1178 accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this); 1178 accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this);
1179 1179
1180
1181 String get builtinJsName() { 1180 String get builtinJsName() {
1182 if (getter 1181 if (getter
1183 && name == const SourceString('length') 1182 && name == const SourceString('length')
1184 && inputs[1].isStringOrArray()) { 1183 && inputs[1].isStringOrArray()) {
1185 return 'length'; 1184 return 'length';
1186 } else if (name == const SourceString('add') && inputs[1].isArray()) { 1185 } else if (name == const SourceString('add') && inputs[1].isArray()) {
1187 return 'push'; 1186 return 'push';
1188 } else if (name == const SourceString('removeLast') 1187 } else if (name == const SourceString('removeLast')
1189 && inputs[1].isArray()) { 1188 && inputs[1].isArray()) {
1190 return 'pop'; 1189 return 'pop';
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 class HIfBlockInformation { 2073 class HIfBlockInformation {
2075 final HIf branch; 2074 final HIf branch;
2076 final SubGraph thenGraph; 2075 final SubGraph thenGraph;
2077 final SubGraph elseGraph; 2076 final SubGraph elseGraph;
2078 final HBasicBlock joinBlock; 2077 final HBasicBlock joinBlock;
2079 HIfBlockInformation(this.branch, 2078 HIfBlockInformation(this.branch,
2080 this.thenGraph, 2079 this.thenGraph,
2081 this.elseGraph, 2080 this.elseGraph,
2082 this.joinBlock); 2081 this.joinBlock);
2083 } 2082 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698