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

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

Issue 10892005: Revert "Support unary - operator." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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) 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 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 } 2185 }
2186 2186
2187 visitDynamicSend(Send node) { 2187 visitDynamicSend(Send node) {
2188 Selector selector = elements.getSelector(node); 2188 Selector selector = elements.getSelector(node);
2189 var inputs = <HInstruction>[]; 2189 var inputs = <HInstruction>[];
2190 2190
2191 SourceString dartMethodName; 2191 SourceString dartMethodName;
2192 bool isNotEquals = false; 2192 bool isNotEquals = false;
2193 if (node.isIndex && !node.arguments.tail.isEmpty()) { 2193 if (node.isIndex && !node.arguments.tail.isEmpty()) {
2194 dartMethodName = Elements.constructOperatorName( 2194 dartMethodName = Elements.constructOperatorName(
2195 const SourceString('[]='), false); 2195 const SourceString('operator'),
2196 const SourceString('[]='));
2196 } else if (node.selector.asOperator() != null) { 2197 } else if (node.selector.asOperator() != null) {
2197 SourceString name = node.selector.asIdentifier().source; 2198 SourceString name = node.selector.asIdentifier().source;
2198 isNotEquals = name.stringValue === '!='; 2199 isNotEquals = name.stringValue === '!=';
2199 dartMethodName = Elements.constructOperatorName( 2200 dartMethodName = Elements.constructOperatorName(
2200 name, node.argumentsNode is Prefix); 2201 const SourceString('operator'),
2202 name,
2203 node.argumentsNode is Prefix);
2201 } else { 2204 } else {
2202 dartMethodName = node.selector.asIdentifier().source; 2205 dartMethodName = node.selector.asIdentifier().source;
2203 } 2206 }
2204 2207
2205 Element interceptor = null; 2208 Element interceptor = null;
2206 if (methodInterceptionEnabled && node.receiver !== null) { 2209 if (methodInterceptionEnabled && node.receiver !== null) {
2207 interceptor = interceptors.getStaticInterceptor(dartMethodName, 2210 interceptor = interceptors.getStaticInterceptor(dartMethodName,
2208 node.argumentCount()); 2211 node.argumentCount());
2209 } 2212 }
2210 if (interceptor != null) { 2213 if (interceptor != null) {
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
3933 new HSubGraphBlockInformation(elseBranch.graph)); 3936 new HSubGraphBlockInformation(elseBranch.graph));
3934 3937
3935 HBasicBlock conditionStartBlock = conditionBranch.block; 3938 HBasicBlock conditionStartBlock = conditionBranch.block;
3936 conditionStartBlock.setBlockFlow(info, joinBlock); 3939 conditionStartBlock.setBlockFlow(info, joinBlock);
3937 SubGraph conditionGraph = conditionBranch.graph; 3940 SubGraph conditionGraph = conditionBranch.graph;
3938 HIf branch = conditionGraph.end.last; 3941 HIf branch = conditionGraph.end.last;
3939 assert(branch is HIf); 3942 assert(branch is HIf);
3940 branch.blockInformation = conditionStartBlock.blockFlow; 3943 branch.blockInformation = conditionStartBlock.blockFlow;
3941 } 3944 }
3942 } 3945 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/scanner/token.dart ('k') | dart/lib/compiler/implementation/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698